Why am I getting these plot warnings?

I am trying to do some simple plotting, plot(diff), and I keep getting these warnings Warning: Error updating Button. Not enough input arguments. at least 50 times before stopping. What Button is it talking about and how do I turn off these warnings?

댓글 수: 2

Walter Roberson
Walter Roberson 2018년 10월 31일
Please show your code.
the cyclist
the cyclist 2018년 10월 31일
편집: the cyclist 2018년 10월 31일
I would modify Walter's suggestion slightly, to recommend that you try to simplify your code down to the smallest version that exhibits the problem, and post that code.
In my experience, that process itself often exposes the bug.

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

답변 (4개)

Ellen Braden
Ellen Braden 2018년 10월 31일

0 개 추천

diff is a difference between two arrays, diff = posA(:,1) - posB(:,1). posA and posB are the same size. Then I plot diff, plot(diff). That's it.

댓글 수: 1

So your code just looks like loading some values into posA and posB, then
diff = posA(:,1) - posB(:,1);
plot(diff)
??
Note: it is not recommended to use diff as the name of a variable, as it is the name of a commonly used function.

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

Ellen Braden
Ellen Braden 2018년 11월 1일

0 개 추천

Even if I change it to posdiff = posA(:,1)-posB(:,1), plot(posdiff) I get the same warnings
Robert Barretto
Robert Barretto 2018년 11월 22일

0 개 추천

I have the same issue with Matlab 2018b. Luckily I can confirm that my code on Matlab 2016b does not produce this problem.
This is true on both Mac and PC.
Capture.PNG

댓글 수: 9

Walter Roberson
Walter Roberson 2018년 11월 22일
I am still waiting to see code.
Robert Barretto
Robert Barretto 2018년 11월 22일
no problem....
desktop.png
Try
restoredefaultpath;
rehash toolboxcache
Robert Barretto
Robert Barretto 2018년 11월 22일
Walter that's fantastic:
You were spot on -- once i saw default path -- I knew I had to check my old libraries. Turns out I have a convex optimization library that likes to run it's own nargchk.
Just removed from path and good to go.
Thanks and happy thanksgiving!
Ellen Braden
Ellen Braden 2018년 11월 26일
Worked for me too! Thanks
Kenny Nona
Kenny Nona 2019년 6월 17일
this, however, deletes the dependencies to installed libraries such as those installed for speedgoat.
Walter Roberson
Walter Roberson 2019년 6월 17일
You would add those in a few at a time until you encountered the problem again, to isolate which one is causing the problem. You would add them at the end of the path instead of at the beginning of the path.
If a library provides its own function with the same name as a MATLAB function, and it does not take care for compatibility, then you pretty much need to edit the library if you want to be to use the library with MATLAB without problems.
Thank-you Walter Roberson! I suddenly had the same problem. Something crept into my extensive paths. Now I have to reverse engineer and find the culprit in my paths.
Try
restoredefaultpath;
rehash toolboxcache
Boian Alexandrov
Boian Alexandrov 2019년 12월 27일
It worked!

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

Stijn Helsen
Stijn Helsen 2019년 8월 26일

0 개 추천

I had the same problem, and the provided solution solved my problem.
Thank you!!

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

릴리스

R2018b

태그

질문:

2018년 10월 31일

댓글:

2019년 12월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by