Calling a script within another script
Mostrar comentarios más antiguos
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 comentarios
KSSV
el 8 de Mzo. de 2017
script in the sense a function?
Adam
el 8 de Mzo. de 2017
What is in script2?
Jan
el 8 de Mzo. de 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
el 9 de Mzo. de 2017
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 8 de Mzo. de 2017
2 votos
You should get rid of the "clear" statements in your scripts.
1 comentario
Sanjit Ganti
el 9 de Mzo. de 2017
Categorías
Más información sobre Scope Variables and Generate Names en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!