getting error in code

조회 수: 1 (최근 30일)
Tanu Gahlaut
Tanu Gahlaut 2020년 5월 23일
답변: Maadhav Akula 2020년 5월 27일
clc; clear; clf;
rng('default');
x=0:0.5:10;
n=length(x);
y1= cos(x)+0.3*normrnd(0,1,[1,n]);
plot(x,y1);
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
what should i do to remove this error?

채택된 답변

Maadhav Akula
Maadhav Akula 2020년 5월 27일
This error comes up when you have a file named plot somewhere in the MATLAB path. I would suggest you to run the following command, which will give you the location of the function/file named plot:
which plot
Now, please rename the function/files other than the builtin function of MATLAB.
Also refer the following link, which might be helpful to you.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by