File Exchange

image thumbnail


version 2.0 (49.2 KB) by Hugh Harvey
An updated version of Pplane that works on Matlab R2018b


Updated 21 Nov 2018

View Version History

View License

Editor's Note: Popular File 2020

An updated version of Pplane that works on Matlab R2018b.
Copyright to John C Polking, Rice University, 2003 for original version.
Updated by Hugh Harvey and George Williams, University of Bristol, 2016.

Cite As

Hugh Harvey (2021). Pplane (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (70)

Haolang Ding

for R2021 windows10, if you meet "Unrecognized function or variable 'pptp1441' stuff and doesnt work.
Open pplane8.m
add this to the second line (change to your username)

so the first 3 lines of this file should be:
function output = pplane8(action,input1,input2,input3)
% pplane8 is an interactive tool for studying planar autonomous systems of

Then, it will work

Thomas Carr

I'm getting the error mentioned below ("Unrecognized function or variable 'pptp1441'.... etc.) but with pptp3789. However, I can't find the folders or files on my Mac to make the suggested fix. If anyone has implemented these "...add this folder to path..." solutions on a Mac, I'd really appreciate some guidance. Thanks.

bar paul

Nathan Streitmatter

It literally does not work, worst thing ever

Adrian A. Firmansyah

If you get error:
Error using feval
Unrecognized function or variable 'pptp1441'.

Error in pplane8 (line 3183)
Ww = feval(dfcn,0,[Xx';Yy']);

Error in pplane8 (line 2745)

Error while evaluating UIControl Callback.
Or something similar, just add this folder to path: "C:\Users\{your_username}\AppData\Local\Temp"
on linux, just add the whole : "/tmp"

Ubaldo Flor

Thank you @Hil Meijer!! Your solution is very usefull for MATLAB R2020b.

Vitaly Baranov

If you get error:
Error using feval
Unrecognized function or variable 'pptp1441'.

Error in pplane8 (line 3183)
Ww = feval(dfcn,0,[Xx';Yy']);

Error in pplane8 (line 2745)

Error while evaluating UIControl Callback.
Or something similar, just add the folder where the file "pptp1441.m" is store to path. In my case it : "C:\Users\Vitaly\AppData\Local\Temp"

Dan Schult

I was able to get this version of pplane to work on Matlab 2020a by a couple of steps:

- change any uimenu property named 'call' to 'MenuSelectFcn'. Be careful. The uicontrol property 'call' should stay the way it is. Only replace the 'call' text inside a uimenu function.
- I also changed ud.plot = 1; to ud.plot = 0; in two places to make the default menu item be don't plot while computing. The drawing while computing was taking too long. I'm not sure what was causing that.

This probably works on version 2020b but I haven't tested thoroughly.

Isa Amirov

Doesn't work in last versions of Matlab

Mohammed Abdulla

Juan Vergara

atefeh hsn

Noemi Luise

I've the matlab version R2020b and have this error:

Error using feval
Unrecognized function or variable 'pptp2661'.

Error in pplane8 (line 3183)
Ww = feval(dfcn,0,[Xx';Yy']);

Error in pplane8 (line 2745)

Error while evaluating UIControl Callback.

How can i solve?
Thank you

Kristen Bruchko

hongguang zhou

and my matlab version is 2019b

hongguang zhou

Hello, thanks for this, but how could I solve the problem below:
misuse of uimen
The first parameter must be a valid parent, such as a window or panel object
(line 907) meload = uimenu(mefile,'label','Load a system ...',...
Thanks in advance!

Mathis Sterling Allen

Could you update this for 2020?

leon zhou

Jose Mejia

César Suárez

Muchas gracias, me ha ayudado mucho

Ismail Amara

Error using feval
Undefined function or variable 'pptp3493'.
Error in pplane8 (line 3171)
Ww = feval(dfcn,0,[Xx';Yy']);
Error in pplane8 (line 2736)
Error while evaluating UIControl Callback.
I have got that error when I executed the pplane8.m file.
I am using R2018b version.
How to solve that error?



Daria Galkina

Thank you so much! This program is really helpful!


Excuse me, how can I use it on R2018a?

@Hil Meijer, IT WORKED, thank you very much!!

faizah alanazi

Thank you.
i would like to ask about if i can used this code for system grater than 2. I have three nonlinear differential equation
x^. = w_1−2 K´sin(x)+K sin(y)
y^. = w_2+K sin(x)−2 K´sin(y)+K sin(z)
z^. = w_3+K sin(y)−2 K´sin(z)
where w's are constant and K constant also.
so how can i used this application to study the stability and plot the phase plane by using Pplane.

Hil Meijer

For matlab2020a; Replace line 72 if isempty(findstr(tmpdir,p)) by "if ~contains(tmpdir,p)"

How can I make it work for R2020a? Thank you in advance

Gabriel Gleizer

Ann Loya

I got an error as follows in r2017a:
meload = uimenu(mefile,'label','Load a system ...',...
Does anyone know how to fix it?

Raúl Ibáñez Couoh


Yang Bin

Thanks for your code. It works! But when I deploy it into exe app, there are some errors. Could you please help me find out why and how to correct them?

Errors in black cammand window ( two paragraphs):
Error in <a href="matlab:helpUtils.errorDocCallback<'pplane', 'c:\Users\***\AppData\Local\Temp\***\mcrCache8.1\pplane1\pplane\pplane.m',26>" style="font-weight:bold">pplane</a> <<a href="matlab: opentoline<'c:\Users\***\AppData\Local\Temp\***\mcrCache8.1\pplane1\pplane\pplane.m',26,0>"line 26</a>>

Output argument "output" <and maybe others> not assigned during call to "c:\Users\***\AppData\Local\Temp\***\mcrCache8.1\pplane1\pplane\pplane.m".
unable to print provided exception.

Matlab: 2013a
Complier: Microsoft Visual C++ 2008 SP1

Nikolai Fast

Andrew Lake

Works as intended in 2019a, although on first run it tells me that windows are open but invisible. Upon instructing it to close the windows, and running again, the UI appears like it should.

Erik Wu

My 2018b can not run this code. There are always a window come out and say " There are some pplane8 figures open although they may be invisible. What do you want to do?" Is there anyone know what should i do?


meload = uimenu(mefile,'label','Load a system ...',...

my 2018b can not run this code

Lisbeth Toy

Margo Levine

Is there a version that works with R2019a?

Huy Doan

everyone opens pplane8.m

saverio albergo

Sepehr Seify

Yongtai Zhang

Excuse me, how can I use it on R2018b?

Gus Breese

Super work, I must reiterate my comment from 4th of May 2017... Are you guys geniuses????

George Williams

Thank you. Working fine with R2018b

Aleksei Tepljakov

Here's a version that's working in R2018b:
Everything seems to be working. The author can update the submission with this.



It doesn't work for MATLAB R2018a.

Rodrigo Mourey Ancona

This code does not work for MATLAB R2018a, anyone know how to get it to wrok?


Not working with MATLAB 2018a.

Carolina Martín


Dan Schult

I was able to adapt the plan.m file available on Prof Polking's webpage to work with Matlab 2017b. I haven't done extensive testing, but it seems to do all the features/menu items with the default ODE system.

I did the following global replacements to pplane8.m calling the file pplane2017b.m
pplane8 -> pplane2017b
'numb','off' -> remove all of these Key/Value pairs. Sometimes they are wrapped around a line end. So search for 'numb' and remove the 'numb','off' pair from each occurrence.
'call' -> 'CallBack'
'number' -> 'NumberTile'

if notice -> if ishghandle(notice)
if gstop -> if ishghandle(gstop)
if dud.notice & dud.noticeflag -> if ishghandle(dud.notice) & ishghandle(dud.noticeflag)

Graham W Griffiths

Has anyone been able to run pplane and dfield functions on Matlab 2017? If so, what modifications were made?


Adding the tempdir folder to Matlab's path is a dangerous idea: You might shadow built-in functions, when TEMP contains M-files. The resulting errors are very hard to debug.

The code uses strings as callbacks, which is outdated for over 15 years now. The bunch of |eval| commands are not secure and reliable also.

The code contains useful comments and a standard help section. The included integrators are clean and efficient, and the source of the parameters and algorithm is mentioned.

The code fails due to the lazy usage of "call" instead of "Callback", and "user" instead of "UserData". What a pity for such a powerful tool.

Amy Diekmann

I am trying to run this program with MATLAB 2017, and I get the following errors:
Error using uimenu
There is no call property on the Menu class.

Error in pplane8 (line 907)
meload = uimenu(mefile,'label','Load a system ...',...

Error in pplane8 (line 52)

Error in run (line 91)
evalin('caller', strcat(script, ';'));

Anna Kalogirou

Opening a saved figure.fig generated with pplane8 returns an error and prevents the figure from closing. Error below. Any suggestions?

Struct contents reference from a non-struct array object.
Error in pplane8 (line 6230)
if sud.remtd
Error in pplane8 (line 6258)
Error while evaluating Figure CloseRequestFcn.

Gerardo García

Gerardo García

I found out the cause of my problem: I was naming the pplan8.m script as pplane81.m to avoid overwriting the old version. Somehow Matlab 2016b didn't like this and it was giving a misleading error message. Changing the name to pplane8.m solved this issue. As this script defines a function called pplane8, it seems that the m file MUST be equally named.
I modified both pplane8.m and a compatible dfield8.m I found in anoter place to dfield9.m and pplane9.m to avoid this naming conflict with the previous version. I also fixed in this version of pplane two other unspotted errors preventing the linearization window to display and the different related graph windows like 3D, composite, etc.
I uploaded these modified versions of dfield and pplane. I hope that they will be useful to all users of these very important scripts for teachig and doing research on Differential Equations.

Gerardo García

Same problem with Matlab R2016b: "Error while evaluating UIControl Callback." is what shows up in the command window after clicking "Proceed" :-(

Gonzalo Menayo

Said Jamal Mohamad

Does any body know, how to make a 3D Phase space with pplane`?

scorpio kuzb

Do you know how to get out of data about phase portrait?Thank you

Landon Bevier

Does not work on R2017a... "Error while evaluating UIControl Callback." is what shows up in the command window after clicking "Proceed". I am very new to matlab and if I had any idea where to start looking I would. Would anyone be willing to help?

Manuel Roesler

Perfect, runs nicely!

Gus Breese

Incredible!!!!!!! Works so well!!! Are you guys geniuses????

Rongming Chen

ben shen

Garrett Miller

George Williams

MATLAB Release Compatibility
Created with R2018b
Compatible with R2018b
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!