Reputation: 707
I Have a matlab script dbEval.m:
function dbEval()
....function implementation
....
end
dbEval();%call this function.
I run this script on the shell with
matlab dbEval.m
Now if I want to pass a argument thru command line execute. How can I do it? and how do I retrieve the argument on my script and use it as argument of my dbEval function?
Upvotes: 0
Views: 2496
Reputation: 4191
You can also try:
matlab -r -nodesktop -nojvm 'dbEval(arg1 arg2 ...)'
Upvotes: 0
Reputation: 7919
You can do like this:
matlab -r 'dbEval(argument1, ... ,argumentN)';
or
matlab -r 'try dbEval(argument1, ... ,argumentN); catch; end; quit'
Upvotes: 2