my pc name is (user's pc) how to pass in run function ?
조회 수: 1 (최근 30일)
이전 댓글 표시
code:
run 'C:\Users\user's PC\Desktop\test.m'
Error: Character vector is not terminated properly.
댓글 수: 0
채택된 답변
추가 답변 (2개)
Image Analyst
2021년 9월 29일
That's too many apostrophes (three). The string ends at the second one.
If you need an apostrophe in the path, use double quotes "
"C:\Users\user's PC\Desktop\test.m"
Image Analyst
2021년 9월 29일
If you want to run the m file, set the Current folder to the folder where the text.m lives and do
>> test
No need to type "run" before it.
Or double click on it in the Current folder panel to bring it up in a text editor, and click the green Run triangle on the Tool ribbon.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!