Unread post Fri Nov 05, 2010 8:31 am

command line arguments in MATLAB

Email sent by Vaidy:
Hello Prof. Dan
I think I am almost done with the take home exam except for the command line argument..
I don't know as how to pass the input file name to SimEngine2D via command line argument in matlab (i mean How do I get the name of the input file when TA types in 'SimEngine2D pendulum')?
Any help on this regard would be appreciated..
Also, Can I have a quick chat with you (today) on my ouput plot? I see a wiggle in my acceleration.. I am not sure if it is OK or not..
Thanks & Regards
Vaidy
P.S.:
(I have done similar stuff in C using main(Char *argv, int argc)- but am not sure how to do it in matlab).



-----------------------------------------
My reply:


Change the way you invoke the simulation engine to this (from MATLAB command line):

>> simEngine2D(‘pendulum’)

I hope this helps.
Dan