Page 1 of 1

configureMatlab.m on Windows 10

Posted: Mon Jun 25, 2018 12:40 pm
by tomaugenstein
Will the configureMatlab.m file run correctly on Windows 10?

If not, is there a way to set up the MATLAB API in Windows 10?

Re: configureMatlab.m on Windows 10

Posted: Mon Jun 25, 2018 12:44 pm
by jimmy
Will the configureMatlab.m file run correctly on Windows 10?
Yep, it is used by people on W10 machines often.

Re: configureMatlab.m on Windows 10

Posted: Mon Jun 25, 2018 2:16 pm
by tomaugenstein
Ok, it's not running correctly on my computer. It keeps returning the following error message:

Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in configureOpenSim>edit_path_txt_file (line 89)
fprintf(fileID,'%s\n',char(Cnew{1}{i}));

Error in configureOpenSim (line 56)
edit_path_txt_file(classFile,OpenSimJarPath)

I'm using MATLAB R2017B, and I've successfully configured MATLAB on the same version using Windows 7. I'm certain that I'm selecting the correct file. Any idea what the issue is?

Re: configureMatlab.m on Windows 10

Posted: Mon Jun 25, 2018 3:13 pm
by jimmy
The issue is that you don't have write access to the path you are defining. Start MATLAB as an administrator (right-click MATLAB, and select Run as administrator). The script is trying to write to a file in the MATLAB installation, which requires administrator privileges.

Re: configureMatlab.m on Windows 10

Posted: Mon Jun 25, 2018 3:33 pm
by tomaugenstein
Ok that worked, thanks for the help