Setting up matlab scripting enviroment
- kristen jakubowski
- Posts: 15
- Joined: Tue Jun 19, 2012 10:40 am
Setting up matlab scripting enviroment
I am trying to set up matlab scripting. I have followed the instructions given, however I keep getting the error
>> configureOpenSim
Error using fopen
Invalid filename.
Error in configureOpenSim>edit_path_txt_file (line 89)
fopen(fileID,'%s\n',char(Cnew{1}{i}));
Error in configureOpenSim (line 56)
edit_path_txt_file(classFile,OpenSimJarPath)
any ideas how to resolve this issue?
Thanks
Kristen
>> configureOpenSim
Error using fopen
Invalid filename.
Error in configureOpenSim>edit_path_txt_file (line 89)
fopen(fileID,'%s\n',char(Cnew{1}{i}));
Error in configureOpenSim (line 56)
edit_path_txt_file(classFile,OpenSimJarPath)
any ideas how to resolve this issue?
Thanks
Kristen
Re: Setting up matlab scripting enviroment
Hi Kristen,
The copy of this file, distributed with opensim, reads
at line 89.
I replicated the error you're seeing by editing the file and changing fprintf to fopen.
Hope that helps,
-james
The copy of this file, distributed with opensim, reads
Code: Select all
fprintf(fileID,'%s\n',char(Cnew{1}{i}));
I replicated the error you're seeing by editing the file and changing fprintf to fopen.
Hope that helps,
-james
- kristen jakubowski
- Posts: 15
- Joined: Tue Jun 19, 2012 10:40 am
Re: Setting up matlab scripting enviroment
Hi James,
When I make that change I still get the following errors,
Im not sure how to resolve the issue.
Thanks
Kristen
When I make that change I still get the following errors,
Code: Select all
>> configureOpenSim
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',char(Cnew{1}{i}));
Error in configureOpenSim (line 56)
edit_path_txt_file(classFile,OpenSimJarPath)
Thanks
Kristen
- Dan Kritzer
- Posts: 2
- Joined: Tue Jun 17, 2014 7:55 am
Re: Setting up matlab scripting enviroment
Have you had any luck Kristen? I'm trying to do the same and am getting the exact same error.
- kristen jakubowski
- Posts: 15
- Joined: Tue Jun 19, 2012 10:40 am
Re: Setting up matlab scripting enviroment
No I haven't had any luck resolving the issue successfully.
Let me know if you do!
Thanks
Kristen
Let me know if you do!
Thanks
Kristen
Re: Setting up matlab scripting enviroment
I haven't been able to replicate this issue. This may occur because you don't have admin privileges to edit the file. Perhaps check this first.
Saying that, it may be with the permissions used by fopen().
You can test by changing line 78;
to read;
let us know if that works.
-james
PS. Also, in the mean time, the instructions for setting up the environment manually are still on the confluence
Saying that, it may be with the permissions used by fopen().
You can test by changing line 78;
Code: Select all
fileID = fopen(txtname);
Code: Select all
fileID = fopen(txtname,'r+');
-james
PS. Also, in the mean time, the instructions for setting up the environment manually are still on the confluence
Last edited by jimmy d on Mon Jun 30, 2014 2:41 pm, edited 1 time in total.
- kristen jakubowski
- Posts: 15
- Joined: Tue Jun 19, 2012 10:40 am
Re: Setting up matlab scripting enviroment
I was able to fix the problem by changing the admin privileges of my computer, the change you suggested did not work. however, changing the setting in the control panel was successful.
thanks
Kristen
thanks
Kristen
- Sarah Roelker
- Posts: 7
- Joined: Mon Sep 24, 2012 10:09 am
Re: Setting up matlab scripting enviroment
Kristen,
Can you be more specific about how you changed the admin privileges on your computer to resolve this error?
Thanks,
Sarah
Can you be more specific about how you changed the admin privileges on your computer to resolve this error?
Thanks,
Sarah
- Wasim Malik
- Posts: 2
- Joined: Fri Mar 01, 2013 7:12 pm
Re: Setting up matlab scripting enviroment
In newer versions of Matlab, the java class directory paths should go into a file called javaclasspath.txt in your preferences folder (which you can find using 'prefdir' in Matlab). I believe the 'librarypath.txt' and 'classpath.txt' file structure is no longer supported by Matlab, as I get a warning in Matlab 2014a.
-Wasim
-Wasim
- kristen jakubowski
- Posts: 15
- Joined: Tue Jun 19, 2012 10:40 am
Re: Setting up matlab scripting enviroment
Sarah where you able to get it to work?
If you can't get the script to run, you can follow the directions on setting up the environment manually, and that should work
Kristen
If you can't get the script to run, you can follow the directions on setting up the environment manually, and that should work
Kristen