필터 지우기
필터 지우기

Can't run the example plot

조회 수: 2 (최근 30일)
Constantino
Constantino 2012년 3월 16일
Hi, when I try to run the example plot:
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
the following error appears:
Undefined function 'fieldnames' for input arguments of type 'double'.
Error in get (line 41)
fields = fieldnames(varargin{1});
Error in newplot (line 61)
fig = getPlotFigure;
Actually the same error appears when I try to plot anything. Please help with R2011b!!

채택된 답변

Walter Roberson
Walter Roberson 2012년 3월 16일
You have created your own routine with the same name as one of the MATLAB routines, and your routine is being called instead of MATLAB's.
I cannot tell at the moment what routine this is happening for, but probably you have your own get.m routine ("get" is a built-in routine for MATLAB so no line number or source would be available if it was the MATLAB "get" that was being invoked.)
which -all get

추가 답변 (1개)

Constantino
Constantino 2012년 3월 16일
Exactly, though the routine wasn't written by me. Thanks!

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by