How do I make a master script that can call other scripts?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How would I go about doing this? I have a hw assignment with 3 different questions. I want to make a different script for each one, then make a master script that calls each one.
0 Kommentare
Antworten (3)
Azzi Abdelmalek
am 11 Apr. 2014
In your main script write
script1 % will run script1
script2 % will run script2
script3
0 Kommentare
Chandrasekhar
am 11 Apr. 2014
master_script.m
function1();
function2();
function3();
end of master_script.m
function1(); %implements the logic for question1
function2(); %implements the logic for question2
function3(); %implements the logic for question3
0 Kommentare
Carlos
am 11 Apr. 2014
Imagine you have the following 3 different .m files
function y=master(a,b)
y=y1(a)+y2(b);
function y=y2(b)
y=2*b;
function y=y1(a);
y=2*a;
When you write this in the command window
>> y=master(1,1)
y =
4
>>
0 Kommentare
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!