Using matlab to read message window results

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

Using matlab to read message window results

Post by David John Saxby » Thu Feb 23, 2012 9:09 pm

Hi All,

I was wondering if the reporting in the message window during OpenSim tool execution can be accessed by Matlab directly or otherwise?

I am particularly interested in the marker error during scaling and IK. Is there any way to get OpenSim to print these to some location or for Matlab to read them directly?

More generally, access to this error information could be a really useful feature (if it isn't one already!)

Best regards,

David Saxby

User avatar
Maria Isabel Orselli
Posts: 39
Joined: Wed Mar 17, 2010 5:30 pm

Re: Using matlab to read message window results

Post by Maria Isabel Orselli » Sat Mar 03, 2012 7:51 am

David,

when I run IK from command line (in windows) I usually save the messages given by the OpenSim in a txt file. I belive that doing this you can read the file with matlab and analyse marker errors.

For example if tou want to save the message in the folder C:\Users\Documents\IKresults in a file caled IK_erors.txt you type:

> C:\Users\Documents\IKresults\IKerors.txt

next to the command line used to run the IK.

I will attach a txt file with an example of what I usually write in a '.bat' file to run IK

You can also see The Musculoskeletal Modeler's Kitchen forum to understand how to run the open sim from comand line.

https://simtk.org/forums/viewtopic.php?f=559&t=2501

I hope it helps
Maria Isabel
Attachments
teste_ik.txt
(453 Bytes) Downloaded 71 times

User avatar
David John Saxby
Posts: 83
Joined: Mon May 09, 2011 8:39 pm

Re: Using matlab to read message window results

Post by David John Saxby » Mon Oct 29, 2012 10:26 pm

Hi Maria Isabel Orselli,

Thanks for writing me back! It has been while since I was dealing with this issue.

We are writing some quality control programs to handle large numbers of trials, and we want to flag errors using the log file.

Your suggestion works great. Do you know if there is a way to have the file saved in the specified directory but at the same time still have the results printed in Matlabs command window?

This is a minor issue, but I feel much better about things when I see the operation being executed and see the results in run time.

Thanks so much!

DJS

POST REPLY