File Exchange

image thumbnail


version (2.37 MB) by Camila Francolin
Solves multiple phase optimal control problems.


Updated 13 Oct 2008

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.

Cite As

Camila Francolin (2021). GPOPS (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (8)

Thomas Dearing

@Reed I tried the exact same procedure with the new release of snopt7 and met similar results.

The function snseti is not defined with the newest release of snopt7, and while it is defined in the snopt-matlab patch, it doesn't match new interface as you described.

We may never get an answer to this though, as it appears GPOPS II has released behind a paywall. I doubt they will make any effort to fix compatibility with this older version.

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


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.


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


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 Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!