Question re: pplane8.m
42 views (last 30 days)
Show older comments
Hi,
I am trying to run pplane8.m in an updated version of Matlab (2015b or 16a) and upon correcting various issues identified in earlier threads, I still get the following errors:
Conversion to logical from matlab.ui.control.UIControl is not possible.
Error in pplane8 (line 3124) if notice
Error in pplane8 (line 2746) pplane8('dirfield',ppdisp);
Error while evaluating UIControl Callback
Any help in resolving them would be much appreciated. The version used is attached.
0 Comments
Answers (3)
Steven Lord
on 14 Sep 2016
This is a result of the change to the graphics system in release R2014b. Graphics handles are now objects, not doubles. This means you can no longer directly perform arithmetic with graphics handles (which I've seen people try; except in the case of incrementing figure numbers to get "the next" figure, it usually didn't work the way they expected) or use graphics handles in a logical statement.
See the "Logical Expressions with Graphics Handles" section of this page from the documentation for more information. I'm not certain what the code is trying to do with that handle, but I think you want the isempty-based approach.
2 Comments
Ismail Amara
on 21 Jul 2020
I have got a different error when I executed the pplane8.m file downloaded from https://www.mathworks.com/matlabcentral/fileexchange/61636-pplane
I am using R2018b version.
================================
Error using feval
Undefined function or variable 'pptp3493'.
Error in pplane8 (line 3171)
Ww = feval(dfcn,0,[Xx';Yy']);
Error in pplane8 (line 2736)
pplane8('dirfield',ppdisp);
Error while evaluating UIControl Callback.
=================================
How to solve that error?
George Williams
on 17 Feb 2017
Gives a good updated version for Matlab R2016b: https://uk.mathworks.com/matlabcentral/fileexchange/61636-pplane?s_tid=srchtitle%20
1 Comment
Zach Gima
on 15 Feb 2017
If anyone else is running into this issue, I have revised the most recent version of pplane8 to be mostly functional with MATLAB_R2016b. This updated version should at the very least let you 1) plot the field for your differential equation system and 2) plot solution curves. As Steven (above) and a few other threads have suggested, the majority of errors came from MATLAB_R2014a onwards changing how graphics handles are dealt with. Here are the fixes I made (may not be comprehensive):
- Changed instances of 'numb' to 'NumberTitle'
- Changed instances of 'user' to 'UserData'
- Changed instances of 'if notice' to 'if isgraphics(notice)'
- Changed instances of 'if dud.notice' to 'if isgraphics(dud.notice)'
1 Comment
Walter Roberson
on 15 Feb 2017
Earlier I had noticed there was one figure() call that used 'number' where the rest used 'numb' ;
See Also
Categories
Find more on Ordinary Differential Equations 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!