Hi everyone, can anybody help me to plot?
Show older comments
I have this error:
Execution of script plot as a function is not supported:
/MATLAB Drive/plot.m
my code is:
x = linspace(0.5* pi, 1000);
y = sin(x)
Y = fft(y);
plot(Y)
4 Comments
do you execute your code in a script that is called 'plot'? then it will be difficult to use the default matlab plot command inside. dont name your functions / scripts equal to default matlab functions
change your script name to e.g. 'myPlotting' in that case
SALAH ALRABEEI
on 12 Jun 2021
agree
Image Analyst
on 12 Jun 2021
Jonas. That looks like an Answer to me, so put it down in the official Answer section below so the poster can accept it and you can get credit for it so you can move from a "Rising Star" to an "MVP".
Jonas
on 13 Jun 2021
i will do that, i was not sure about the reason behind the error, that's why i posted it as a proposition as comment.
Answers (1)
Jonas
on 13 Jun 2021
0 votes
do you execute your code in a script that is called 'plot'? then it will be difficult to use the default matlab plot command inside. dont name your functions / scripts equal to default matlab functions
change your script name to e.g. 'myPlotting' in that case
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!