Calling a script within another script
Ältere Kommentare anzeigen
I am trying to call a script (say script2) within another script (say script1). But I have to declare a few variables in script1 before calling script2. When I try to do this, the script1 directly goes to calling script2, without declaring the variables in between. How to overcome this?
{clear
xq=2; yq=2;
script2}
4 Kommentare
KSSV
am 8 Mär. 2017
script in the sense a function?
Adam
am 8 Mär. 2017
What is in script2?
Jan
am 8 Mär. 2017
@Sanjit: Please do not invent an own syntax containing curly braces to explain code in the forum. Prefer standard Matlab syntax, because this is understood here in general.
Sanjit Ganti
am 9 Mär. 2017
Akzeptierte Antwort
Weitere Antworten (1)
Walter Roberson
am 8 Mär. 2017
2 Stimmen
You should get rid of the "clear" statements in your scripts.
1 Kommentar
Sanjit Ganti
am 9 Mär. 2017
Kategorien
Mehr zu Scope Variables and Generate Names finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!