필터 지우기
필터 지우기

How to pass system argument to matlab script?

조회 수: 2 (최근 30일)
Mady J
Mady J 2018년 9월 18일
편집: Jan 2018년 9월 18일
Hello,
I am tyring to pass system argument to my script and it's not working my script is like :
path_of_simulink_model = x;
disp(path_of_simulink_model)
cd path_of_simulink_model
pwd
and in CMD i am passing argument like this :
>matlab -r "x ='E:\Project_Workspace\SVN_Tagging'"code_generation_testing
but it's not working.Can any body tell me how to pass system argument(and file path as argument) in matlab script?

채택된 답변

Jan
Jan 2018년 9월 18일
편집: Jan 2018년 9월 18일
> matlab -r "x ='E:\Project_Workspace\SVN_Tagging'; code_generation_testing"
Wouldn't it be smarter to use a function instead of a script, when you want to provide input arguments?

추가 답변 (1개)

Walter Roberson
Walter Roberson 2018년 9월 18일
cd(path_of_simulink_model)

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by