0

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?

1

2 Answers 2

2

You can do like this:

matlab -r 'dbEval(argument1, ... ,argumentN)';

or

matlab -r 'try dbEval(argument1, ... ,argumentN); catch; end; quit'
Sign up to request clarification or add additional context in comments.

Comments

0

You can also try:

matlab -r -nodesktop -nojvm 'dbEval(arg1 arg2 ...)'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.