سؤال

I'm trying to execute the below lines

command ='C:\Program Files (x86)\MATLAB\R2010a\bin\matlab -wait -nodesktop -nosplash -r wrapper';
[status, output] = system(command);

but I'm getting an error saying:

' 'C:\Program' is not recognized as an internal or external command,
    operable program or batch file.'

it seems to me that the spaces are making the error as shown from the error it only captured 'C:\Program', so can anyone please advise?

هل كانت مفيدة؟

المحلول

Try wrapping the path in double quotes.. as in :

"C:\Program Files (x86)\MATLAB...."

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top