How to remove the error The file C:\Users\a​ishw\OneDr​ive\Docume​nts\MATLAB​\startlab.​m is not in the project?

조회 수: 4 (최근 30일)
I am creating a project from New -> Project -> From folder. I am unable to add atartup file from my folder where all the matlab files are saved.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 10월 7일
편집: Ameer Hamza 2020년 10월 7일
As the error message indicates, the startup file must be placed inside the project folder. You cannot add an arbitrary file as project startup. Read the description of the startup file here: https://www.mathworks.com/help/matlab/ref/matlab.project.project.addstartupfile.html#mw_65b41c29-bd2c-4034-ab5b-a4d4bf3c30b5
  댓글 수: 2
Hiro Yoshino
Hiro Yoshino 2020년 10월 7일
I have created a project with a file set as a startup file. It worked well.
Have you tried as follows?:
  1. complete creating a new project
  2. add startupfile.m in the project
  3. make the file as a startup file
Ameer Hamza
Ameer Hamza 2020년 10월 7일
Sorry! It wasn't my question. I am just answering the original question. The problem isn't that OP hasn't created a startup file; instead, they are trying to add a file outside of the project folder as a startup file. That is why OP is getting that error.

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

추가 답변 (1개)

Hiro Yoshino
Hiro Yoshino 2020년 10월 7일
From Run Checks and press the third button from the top then you can add your new files to the project.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by