New install 2021a not plotting data

조회 수: 13 (최근 30일)
howe
howe 2021년 7월 23일
댓글: howe 2021년 7월 26일
Just upgraded from 2019b to 2021a. Standard workflow for plotting data not working in 2021a.
Variable: Y is 5500000x1 double containing reals from -500 to +500 at 4 decimal precision
Calling figure; plot(Y) gives this error:
Array indices must be positive integers or logical values.
Error in matlab.graphics.shape.internal.ScribeStackManager/findLayer
Error in matlab.graphics.shape.internal.ScribeStackManager/getLayer
Error in newplot (line 77)
ax = gca(fig);
Error in matlab.graphics.internal.newplotwrapper (line 11)
axReturn = newplot(varargin{:});
Same data, same command in 2019b plots without issue. Note, even setting Y = [1;2;3;4] and calling plot(Y) fails and gives same error. Is this an installation problem? Some weird incompatibility?
  댓글 수: 3
howe
howe 2021년 7월 23일
Thanks Konrad. No, I haven't redefined anything - frankly just installed the update to 2021a less than an hour ago. I think my install must be glitchy.
Konrad
Konrad 2021년 7월 23일
Yes, thats weird! I'd rerun the installer.

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

답변 (2개)

Steven Lord
Steven Lord 2021년 7월 23일
Let's make sure you haven't accidentally written or downloaded a function that is taking precedence over the built-in functions and the functions included in MATLAB. What do these commands display?
which plot
built-in (/MATLAB/toolbox/matlab/graph2d/plot)
which gca
built-in (/MATLAB/toolbox/matlab/graphics/gca)
which newplot
/MATLAB/toolbox/matlab/graphics/axis/newplot.m
which get
built-in (/MATLAB/toolbox/matlab/graphics/objectsystem/get)
  댓글 수: 1
howe
howe 2021년 7월 26일
Steven, as outlined below, none of the functions were overwritten. I reinstalled (clean) and got the same problem. Found a solution to fix the problem transiently (while in same session):
restoredefaultpath
rehash toolboxcache
savepath
So something is going wrong with the path.
I can live with this. But another problem has arisen: now I can't open apps, such as the Signal Analyzer. Matlab just hangs, indefinitely (like overnight if allowed), trying to open the app. Any thoughts on this would be appreciated, especially since: 1) R2019 was working perfectly in my hands for years; 2) I reinstalled R2021a twice and still have the same trouble. Thanks.

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


howe
howe 2021년 7월 23일
Thanks Steven.
built-in (C:\Program Files\MATLAB\R2021a\toolbox\matlab\graph2d\plot)
built-in (C:\Program Files\MATLAB\R2021a\toolbox\matlab\graphics\gca)
C:\Program Files\MATLAB\R2021a\toolbox\matlab\graphics\axis\newplot.m
built-in (C:\Program Files\MATLAB\R2021a\toolbox\matlab\graphics\objectsystem\get)
Returns look correct.
  댓글 수: 1
howe
howe 2021년 7월 23일
I am starting to get all sorts of weird errors. I suspect something didn't work correctly with the install. I was just running some basic calculations on arrays and got the following error chain:
Warning: Error occurred while executing the listener callback for event POST_REGION defined for class matlab.internal.language.RegionEvaluator:
Error using set
Too many input arguments.
set(rootobj,'ShowHiddenHandles','on');
Error in findall (line 37)
c = onCleanup(showHiddenHandlesToFindAllHandles(rootobj));
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager
Error in matlab.internal.editor.FigureManager.snapshotAllFigures
This is what I was wunning (as livescript):
eeg=A01D0;
efreq=1000; %1000 Hz sampling
epochlength=1000; %1 second at 1000 Hz
sz=length(eeg);
numepochs=floor(sz/epochlength)-1;
linelen=0;
L = zeros(numepochs,1);
for ct = 1:numepochs
start = (ct-1)*epochlength+1;
stop = ct*epochlength;
for e = start:stop
linelen = linelen + abs(eeg(e,1));
end
L(ct,1)=linelen;
linelen = 0;
end

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

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by