hyperlink from one *.m file to another *.m file

I have 5 matlab code files and I want to go to 2nd file *.m after I run 1st *.m file. So, is it possible to jump from one matlab code to another by putting a hyperlink at the end of 1st file?

 채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 13일

0 개 추천

No, hyperlinks are not supported.
However, you can just put the name of the second script at the end of the first script.
script1.m
plot(1:10, rand(1,10));
script2
script2.m
disp('got to script 2')

댓글 수: 3

Thank you Walter Roberson, Your suggestion helped me getting close to my answer. However, in my case the code went like
cd('path for code 1\');
run("file1.m");
disp('code 1 over')
hold on;
cd('path for code 2\');
run("file2.m")
disp('code 2 over')
Stephen23
Stephen23 2018년 4월 13일
@Megha: use absolute/relative paths rather than cd. cd is slow, makes debugging harder, and can cause different functions to be accessible to MATLAB.
Megha
Megha 2018년 4월 13일
@ Stephen Cobeldick : Sure! Thank you :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Historical Contests에 대해 자세히 알아보기

태그

질문:

2018년 4월 13일

댓글:

2018년 4월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by