can we call a script from another script or only functions can be called?
Mostra commenti meno recenti
i have to convert the called script into funciton?
Risposta accettata
Più risposte (2)
Pablo Dias
il 6 Set 2018
2 voti
You can just call "scriptName;" ,without double quotes.
All variables in the caller script will be available.
1 Commento
Daniyal Arif
il 3 Ago 2019
it is not working
giviingerror (undifined function)
noobo veryo
il 27 Gen 2021
x=input('is your program 2D or 3D? (input: 2 or 3) \n');
if x==2
disp('Running 2D Truss Codes')
Truss_2D;
elseif x==3
disp('Running 3D Truss Codes')
Truss_3D;
else
disp('wrong dimensions')
end
As you can see, I had 2 script files (Truss_2D and Truss_3D) and I called them by simply entering their names.
you can find better explanation in matlab documentation (doc run - Tips section)
Categorie
Scopri di più su Structural Analysis in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!