I have a function file which contains a GUI.
Whenever I run (compile) the file using the green run logo in MATLAB it successfully builds. Whenever I try to run it from the command window i.e: run(MyFile);I get this error but the file still builds correctly:
??? Error using ==> fileparts at 31
Input must be a row vector of characters.
Error in ==> run at 25
[p,s,ext] = fileparts(script);
I'm not getting the error when I hit 'run' in the text editor.
Thoughts?
dbstop if errorand check what datatypescriptis.31 error(message('MATLAB:fileparts:MustBeChar'));Was what I got when I typed:dbstop if error; run(MyFile);in the command windowscriptis. Should be some file path (char)scriptis? Sorry, new to MATLAB. Where would I look?whos scriptat the command line