Question re: pplane8.m

44 次查看(过去 30 天)
Panos Kevrekidis
Panos Kevrekidis 2016-9-14
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.

回答(3 个)

Steven Lord
Steven Lord 2016-9-14
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 个评论
Ismail Amara
Ismail Amara 2020-7-21
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 2021-3-4
Same question for me.

请先登录,再进行评论。


George Williams
George Williams 2017-2-17

Zach Gima
Zach Gima 2017-2-15
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 个评论
Walter Roberson
Walter Roberson 2017-2-15
Earlier I had noticed there was one figure() call that used 'number' where the rest used 'numb' ;

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by