can we call a script from another script or only functions can be called?
이전 댓글 표시
i have to convert the called script into funciton?
채택된 답변
추가 답변 (2개)
Pablo Dias
2018년 9월 6일
2 개 추천
You can just call "scriptName;" ,without double quotes.
All variables in the caller script will be available.
댓글 수: 1
Daniyal Arif
2019년 8월 3일
it is not working
giviingerror (undifined function)
noobo veryo
2021년 1월 27일
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)
카테고리
도움말 센터 및 File Exchange에서 Structural Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!