View License

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

» Watch video

Highlights from
Demo: Finding an Optimal Path Using MATLAB and Optimization Toolbox

5.0 | 8 ratings Rate this file 41 Downloads (last 30 days) File Size: 23.3 KB File ID: #36321 Version:
image thumbnail

Demo: Finding an Optimal Path Using MATLAB and Optimization Toolbox



24 Apr 2012 (Updated )

Solve the path planning problem of going through a vector field of wind in the least possible time.

| Watch this File

File Information

This demo shows how to use MathWorks products to solve a path-planning problem.
The objective is to find the optimal path (path of least time) through a randomly generated vector field of wind values.

Scripts are included which show how to set up both a time-independent and time-dependent version of the optimization problem.

Moreover, a GUI (created with GUIDE) is included to show an example of creating an interactive way to do this analysis. The path may be defined by dragging control points with the mouse, and the parameters (path distance and time) are updated on-the-fly.

Requires: Optimization Toolbox.

Global Optimation Toolbox (use MultiStart to run several trials to search for a globally optimal solution)

Parallel Computing Toolbox (run the MultiStart trials in Parallel)

Required Products Optimization Toolbox
MATLAB release MATLAB 7.14 (R2012a)
Other requirements Optional: Global Optimization Toolbox, Parallel Computing Toolbox
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (10)
21 Nov 2016 Aniq Muhammad

01 Nov 2016 Brett E Barkley

To solve the issue that c4mm11 describes you need to edit the code and remove instances of the nonzero function operating on graphics arrays. Something along the lines of: 'handles.h_ctrlpts(isprop(handles.h_ctrlpts,'Color'))' in place of 'nonzeros(handles.h_ctrlpts)' and similar such instances worked for me.

Comment only
01 Nov 2016 Brett E Barkley

25 Sep 2016 c4mm11

c4mm11 (view profile)

Hi. I'm getting the following error when I run PathOptimizationDemo.m. Using R2016a.

Undefined function 'nonzeros' for input arguments of type ''.

Error in PathOptimizationDemo>makeInteractiveLine (line 207)

Error in PathOptimizationDemo>pushbutton_NewField_Callback (line 157)

Error in PathOptimizationDemo>PathOptimizationDemo_OpeningFcn (line 72)
pushbutton_NewField_Callback(hObject, eventdata, handles)

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in PathOptimizationDemo (line 48)
gui_mainfcn(gui_State, varargin{:});

Comment only
28 May 2016 Yildirim

01 May 2016 Muhammad Azam

09 Jul 2015 Julien Bernard

01 Jan 2015 Egor Timme

16 Apr 2013 Jose Luis Ocaña

06 Dec 2012 Tom K

Tom K (view profile)

01 Sep 2016

Updated license

Contact us