필터 지우기
필터 지우기

Legend causes script to crash

조회 수: 3 (최근 30일)
sean mcmahon
sean mcmahon 2015년 8월 10일
답변: sean mcmahon 2015년 8월 10일
Everything was working fine and then I tried to use persistence to allow my legend to be incremented.
It didn't work so I left it but now legend throws up an error: e.g.
x = -pi:pi/20:pi;
y1 = sin(x);
y2 = cos(x);
figure
plot(x,y1,'-ro',x,y2,'-.b')
legend('sin(x)','cos(x)')
Attempt to execute SCRIPT legend as a function:
C:\Users\sean\Desktop\matlab\legend.m
Error in simplegraph (line 7)
legend('sin(x)','cos(x)')
I tried rebooting the PC with no joy, (Matlab 2015a).
It like I have messed up matlab!
Anyone have any ideas?

채택된 답변

sean mcmahon
sean mcmahon 2015년 8월 10일
Oops! I had a script called legend, I don't recall creating it, anyway deleting fixed the issue.

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by