A command like this runs the m-file successfully:

`"C:\<a long path here>\matlab.exe" -nodisplay -nosplash -nodesktop -r "run('C:\<a long path here>\mfile.m'); exit;"`

### Related Contents:

- How can I pass an argument to a PowerShell script?
- How can I index a MATLAB array returned by a function without first assigning it to a local variable?
- Differences between Octave and MATLAB [closed]
- xkcd style graphs in MATLAB
- Is it possible to define more than one function per file in MATLAB, and access them from outside that file?
- How to get the type of a variable in MATLAB
- Is there a foreach in MATLAB? If so, how does it behave if the underlying data changes?
- Is MATLAB OOP slow or am I doing something wrong?
- Using i and j as variables in MATLAB
- What can MATLAB do that R cannot do? [closed]
- How do I set default values for functions parameters in MATLAB?
- How to elegantly ignore some return values of a MATLAB function
- Automatically plot different colored lines
- How can I apply a function to every row/column of a matrix in MATLAB?
- Map function in MATLAB?
- How to get all files under a specific directory in MATLAB?
- Octave / Matlab: Extend a vector making it repeat itself?
- Hash tables in MATLAB
- Setting graph figure size
- cocktail party algorithm SVD implementation … in one line of code?
- Why/when should I prefer MATLAB over Octave?
- MatLab error: cannot open with static TLS
- Changing Fonts Size in Matlab Plots
- Octave/Matlab: Adding new elements to a vector
- Iterating through struct fieldnames in MATLAB
- How to change the window title of a MATLAB plotting figure?
- How can I count the number of elements of a given value in a matrix?
- What is your favourite MATLAB/Octave programming trick? [closed]
- Function for ‘does matrix contain value X?’
- Why is 24.0000 not equal to 24.0000 in MATLAB?
- How do I get the handles of all open figures in MATLAB
- Loop through files in a folder in matlab
- What is the closest thing MATLAB has to namespaces?
- How to iterate over a column vector in Matlab? [duplicate]
- How to use SIFT algorithm to compute how similar two images are?
- Accelerating MATLAB code using GPUs?
- What is the difference between .m and .mat files in MATLAB
- MATLAB – multiple return values from a function?
- Fitting largest circle in free area in image with distributed particle
- .m files as MATLAB/Octave for Sublime Text
- Get the indices of the n largest elements in a matrix
- MATLAB – How to zoom subplots together?
- Inhibit Matlab Window Focus Stealing
- Random numbers that add to 100: Matlab
- ternary operator in matlab
- Understanding Matlab FFT example
- How do I visualize a matrix with colors and values displayed?
- Find location of current m-file in MATLAB
- How to normalize a histogram in MATLAB?
- How to normalize a histogram in MATLAB?