Matlab R2014b with OS X Yosemite Issue

I am trying to use the plane program and keep getting the following error when I run it:
Error using figure
There is no numb property on the Figure class.
Error in pplane8 (line 398)
ppset = figure('name','pplane8 Setup','numb','off',...
Any ideas on what I should do? I've tried two separate Macs on Yosemite and it does the same thing.

13 Comments

Andrew
Andrew on 10 Dec 2014
Edited: Andrew on 10 Dec 2014
Austin, did you ever fix all these issues? I am coming across the same problem, and even after fixing the 'numb' and 'user' problems, there are still issues. Was just wondering if you had the code of working pplane8 for 2014b?
I also had this issue, but I seemed to make it work. Other than changing all 'numb' to 'NumberTitle' and 'user' to 'UserData' there is one more thing.
  • Change all "if notice" to "if notice ~= 0"
  • 2x "if dud.notice & ...", change that to "if dud.notice ~= 0 && ..."
  • and one "if dud.notice" to "if dud.notice ~= 0"It looks ugly but it seems to work. I got it to simulate
Thanks Joakim, it works for me.
I'm attempting to run pplane8.m on my MacBook Pro. I'm running Mac OS X ver. 10.10.3 (Yosemite) using MATLAB R2014b. I've applied all the fixes discussed in this thread, but the code gives me the following messages in the Command Window:
>> pplane8 Error using figure While setting the 'Number' property of Figure: Value must be a scalar double or the empty matrix Error in pplane8 (line 5097) ppxy = figure('number','off',...
Error in pplane8 (line 5078) hh = pplane8('plotxyfig',type,gcf);
Error while evaluating Menu Callback
>>
I've attached a copy of the code to this note.
Please advise.
Sam Dupree.
You missed converting 'number' on the line
ppxy = figure('number','off',...
'tag','pplane8','visible','off');
I'm not sure what I need to replace 'number' with. In addition to the error I'm getting on line 5097, I'm also getting an error on line 5078 per the following error message:
_Error using figure While setting the 'Number' property of Figure: Value must be a scalar double or the empty matrix Error in pplane8 (line 5097) ppxy = figure('number','off',...
Error in pplane8 (line 5078) hh = pplane8('plotxyfig',type,gcf);
Error while evaluating Menu Callback_
Please advise.
Change the 'number', 'off' to 'numbertitle', 'off'
Walter, thank you the clarification. I took your advice and made the change, but I'm still getting errors. The errors appear to arise when I attempt to plot x vs. t, y .vs. t or both x and y vs. t on the same plot). The messages I get are:
Undefined function 'real' for input arguments of type 'matlab.ui.Figure'. Error in int2str (line 12) x = real(x); Error in pplane8 (line 5099) name = ['pplane8 t-plot # ',int2str(ppxy)];
Error in pplane8 (line 5078) hh = pplane8('plotxyfig',type,gcf);
Error while evaluating Menu Callback
I've attached a current copy of pplane8 with all the updates discussed in this thread.
Please advise.
The revised version did not happen to get included.
Okay, so this is something that affects R2014b and later, and the solution to it involves a change that is not backwards compatible.
On line 5099 where there is currently
name = ['pplane8 t-plot # ',int2str(ppxy)];
change that line to be
name = ['pplane8 t-plot # ',int2str(get(ppxy,'Number'))];
Note that this is 'Number', not 'NumberTitle'.
Walter,
Made the change for line 5099 and it works. Thank you. One last though, what was it that caused you to see that I needed to replace ppxy with get(ppxy,'Number')?
Ssm Dupree.
I looked at the code and saw that it was trying to create a string containing the figure number. I looked at the documentation for Figure Properties and saw that there is now a Number property that returns the figure number. So get() of the Number is what was needed. The rest of the time was spent searching through the code to be sure that the problem did not occur elsewhere.
Walter,
Thank you for the explanation. I gratefully appreciate it. This clears things up for me.
Again, thanks.
Sam Dupree.

Sign in to comment.

 Accepted Answer

Austin - try changing the numb to the full property name NumberTitle. So line 398 of pplane8 would become
ppset = figure('name','pplane8 Setup','NumberTitle','off',...
'tag','pplane8','visible','off',...
'UserData',ud);
Note the change also from user to UserData. See figure window properties for more details.

7 Comments

That got the application to start, but now I get the following error when I try to proceed:
Error using figure
There is no numb property on the Figure class.
Error in pplane8 (line 2019) ppdisp = figure('name','pplane8 Display',...
Error while evaluating UIControl Callback
Austin - that is the same error message as before so the same fix must be applied.
ppdisp = figure('name','pplane8 Display',...
'NumberTitle','off',...
'Interruptible','on',...
'visible','off',...
'tag','pplane8');
There are a couple of other places in the code that will require the same fix, so you may as well do a find and replace.
You will often encounter this type of problem when using code written for older versions of MATLAB, so there could very well be other lines in this function that will require similar fixes.
What would be the fix for:
Error in pplane8 (line 1696) aud = get(dud.axes,'user');
I'm going through and messing with it trying to update it, but some of the terms I'm not sure what they need to become...
It is most likely is UserData (see http://www.mathworks.com/help/matlab/ref/axes-properties.html). If you have a property that you are unsure of, then check the list of properties for that which is the closest match.
Any solutions for the last issue of Austin?
I mean the follow Error:
Error in pplane8 (line 1696) aud = get(dud.axes,'user');
Try typing just
get(dud.axes)
to see which properties are available. If you don't see something for 'user' then you may have to use UserData.
Thanks Geoff it worked! i also had to make a few changes that i haven't read from this forum but so far it seems to work just fine!

Sign in to comment.

More Answers (2)

Hi, I have gone through and made all these changes to Pplane - Please see link for updated version: http://uk.mathworks.com/matlabcentral/fileexchange/61636-pplane
Jakob
Jakob on 21 Jun 2016
Very good work everyone. The pplane-tool is extremely useful! Great you made it work again in newer Matlab!! Cannot give enough kudos ;-)

Categories

Community Treasure Hunt

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

Start Hunting!