Matlab file MAC - Script Error

조회 수: 4 (최근 30일)
Rajan
Rajan 2023년 2월 7일
댓글: Walter Roberson 2023년 2월 7일
For my work I have to upload a MATLAB script to this website. The script originally runs fine. When I then download the file once submitted and then run the script, the script won't work. It says the error is that the filename must only contain letters, numbers or underscores and that the file name isn't valid.
(I am using a MAC). Can anyone help me solve the issue ? It seems like when I upload the file to the website, it changes the file name by adding a (number) at the end of the original file name.

답변 (1개)

Steven Lord
Steven Lord 2023년 2월 7일
Did you already have a copy of the file in the directory to which you downloaded? I'm not sure if Mac behaves the same way as Windows does, but I'd guess it probably does. Windows will append " (2)", " (3)", etc. to the file name if you try to download the same file multiple times. Neither spaces nor parentheses are allowed in the names of MATLAB program files.
So if you're trying to run myfunction.m that would work. If you then downloaded myfunction.m again (so its name is now "myfunction (1).m") you'll need to rename it.
  댓글 수: 4
ihsvoaopk
ihsvoaopk 2023년 2월 7일
So, when my teacher downloads the file, the script should run smoothly straight away without having to rename the file or anything, since it will be their first time downloading the file ?
Walter Roberson
Walter Roberson 2023년 2월 7일
As long as the file name is a valid MATLAB identifier.

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

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by