addpath not working - fopen problem?

조회 수: 9 (최근 30일)
Luisa Nicoletti
Luisa Nicoletti 2017년 4월 28일
답변: Luisa Nicoletti 2017년 4월 28일
when adding a path through the simple command:
>> addpath(genpath('D:\Documents\MATLAB'))
the response is:
Warning: Function fopen has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
In path (line 109)
In addpath (line 88)
Warning: Function input has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
  댓글 수: 2
Adam
Adam 2017년 4월 28일
Sounds like you have created your own function called fopen. Did you do what the warning message suggests if this is the case?
Stephen23
Stephen23 2017년 4월 28일
@Luisa Nicoletti: like the message says, you should rename your fopen file/function.

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

답변 (2개)

Jan
Jan 2017년 4월 28일
Did you create the two function "fopen.m" and "input.m" in the current folder or another folder in the Matlab path? If so, why did you do this? It will and does confuse Matlab.
But perhaps this is not the problem. What is the current folder? Perhaps you work in the toolbox directory, which contains the help sections of the fopen.m and input.m. I'm not sure if this produces such a warning, but it is recommended not to work in a toolbox folder. Try this:
cd(tempdir) % For example
and run the code again. Does the error still appear?

Luisa Nicoletti
Luisa Nicoletti 2017년 4월 28일
Jan, Adam, Stephen, yes I actually have a funtion fopen.m input.m and pause.m which disturb this new version of matlab (was not the case before). I will try to remove or rename it. Thnaks a lot for your help! regards, Luisa

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by