How to call m-file
Ältere Kommentare anzeigen
Hello,
I have an if condition in the intro of my code , and there are three cases i want to do like this in matlab
(example )case 1 call mfile1,
case 2 call mfile2,
case3 call mfile3
thanks :)
Akzeptierte Antwort
Weitere Antworten (1)
Wayne King
am 4 Apr. 2012
How about a switch
switch test
case 'value1'
mfile1()
case 'value2'
mfile2()
otherwise
mfile3()
end
You have not specified what the condition is, e.g. numeric, string, etc.
Kategorien
Mehr zu Adding custom doc finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!