Question re: pplane8.m

38 views (last 30 days)
Panos Kevrekidis
Panos Kevrekidis on 14 Sep 2016
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.

Answers (3)

Steven Lord
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
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?
Subhash Pramanik
Subhash Pramanik on 4 Mar 2021
Same question for me.

Sign in to comment.


George Williams
George Williams on 17 Feb 2017
  1 Comment
Hugh Harvey
Hugh Harvey on 17 Feb 2017
Thanks George, I hope people find this code useful

Sign in to comment.


Zach Gima
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):
  1. Changed instances of 'numb' to 'NumberTitle'
  2. Changed instances of 'user' to 'UserData'
  3. Changed instances of 'if notice' to 'if isgraphics(notice)'
  4. Changed instances of 'if dud.notice' to 'if isgraphics(dud.notice)'
  1 Comment
Walter Roberson
Walter Roberson on 15 Feb 2017
Earlier I had noticed there was one figure() call that used 'number' where the rest used 'numb' ;

Sign in to comment.

Categories

Find more on Interactive Control and Callbacks 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!