File Exchange

image thumbnail


version 1.0 (2.37 MB) by

Solves multiple phase optimal control problems.



No License

Gauss Pseudospectral Optimization Software(GPOPS) is a MATLAB program for solving non-sequential multiple-phase optimal control problems. GPOPS uses the Gauss pseudospectral method (GPM) developed at MIT, Draper Laboratory, and The University of Florida. These files can also be found on SourceForge under the project name GPOPS.

Comments and Ratings (7)

I want to run the GPOPS. Following error appears. How to remove this error?
Undefined function or variable 'snprint'.

Error in gpops (line 306)
snprint('snoptmain.out'); % Name of SNOPT Print File

Error in brysonDenhamMain (line 75)
output = gpops(setup);

honghong pu

@mincong he, are you chinese? I met some trouble with the GPOPS, can we talk further? I will be very glad for you can contact me as soon as possible. QQ:1492799553

honghong pu

@Reed I met a problem the same as you, could you tell me have you solve the problem and how to sove it?

mincong he

@Reed You can find the snsovle interface on the new version of gpops in the 'nlp' folder


Reed (view profile)

I am trying to run GPOPS with the trial version of snoptmex and the snopt-matlab files (

When I run GPOPS, I get the following errror: gpops (line 364) "Error using snsolve, Too many output arguments."

The line of code where the error occurs is:
[x,F,xmul,Fmul,info,xstate,Fstate,ns,ninf,sinf,mincw,miniw,minrw] = snsolve(init,xlow,xupp,xmul,xstate,Flow,Fupp,Fmul,Fstate,ObjAdd,ObjRow,AA,iAfun,jAvar,iGfun,jGvar,userfun);

This does not match the current snsolve interface, but that may be expected since the last update on these GPOPS files was 2008. I wonder if there is an older version of snsolve that is compatible with this calling syntax? If so, can you recommend where to find it?

Alternately, if you could provide an updated version of gpops that calls snsolve with the current interface, that would be even better.

Thanks for your help on this. It looks like very useful software if I can get it working with SNOPT.


John (view profile)

Does GPOPS require the path constraint inequality to include the control? Or can it be a function of just the states?


star (view profile)

Wonderful work but i met a problem when run this program .
gpopsEndPointControl too many outputs.
Could you tell me how to fix it? Thank a lot!

MATLAB Release
MATLAB 7.5 (R2007b)

MATLAB Online Live Editor Challenge

Win cash prizes and have your live script featured on our website

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video