bat file for running MATLAB code from Notepad++

Viewed 420

I want to write a .bat file which, when I push the run button on Notepad++, runs my matlab code through the command line

I wrote a simple batch file for running specific code (test.m)

How can I pass other file addresses through Notepad++'s run button to my batch file?

I would also appreciate other solutions.

My code:

"C:\Program Files\MATLAB\R2014b\bin\matlab.exe" -nodisplay -nosplash -nodesktop -r "; run('D:\test.m');"
1 Answers

This one I wouldn't use a CMD command, but rather a batch file that runs certain parts of your program. If I understand you correctly, then you want to run the MATLAB program when you click on the icon, as well as notepad++. What I would do is the following.

Right Click on the program, select properties, then change the target line to

"[Notepad++ Target Path Here]", "C:\Program Files\MATLAB\R2014b\bin\matlab.exe" -nodisplay -nosplash -nodesktop -r "; run('D:\test.m');"

This should run both programs

Hope this helps!

Related