I have a matlab function checkMembraneSpline.m, and I want to run this in the command line using the matlab command. I tried the following
matlab -r -nodisplay -nojvm "checkMembraneSpline(10,1000,'',100,500,2.5); catch; end; quit"
which returns this cryptic error:
/opt/apps/rhel7/matlabR2019a/bin/matlab: eval: line 1734: syntax error near unexpected token `('
/opt/apps/rhel7/matlabR2019a/bin/matlab: eval: line 1734: `exec "/admin/apps/rhel7/matlabR2019a/bin/glnxa64/MATLAB" -r "-nodisplay" checkMembraneSpline(10,1000,'',100,500,2.5); catch; end; quit -nojvm'
However, when I launch matlab by doing matlab -nojvm -nodisplay and running the function from there by
>>> checkMembraneSpline(10,1000,'',100,500,2.5)
it works. I suspected it was something to do with the quotation marks, but switching " with ' also doesn't work. What am I missing?