danielrherber / optimal-control-direct-method-examples

Teaching examples for three direct methods for solving optimal control problems namely single shooting, single step, and pseudospectral.
BSD 3-Clause "New" or "Revised" License
43 stars 16 forks source link

Platform dependency problem #1

Closed yonghoonlee closed 7 years ago

yonghoonlee commented 7 years ago

Line 56 of INSTALL_Direct_Method_Examples.m file contains a Windows dependent directory delimiter '\', which make this code not executable in Mac or Linux. You may recognize platform before using those delimiter such as:

if ispc
    dirdelimiter = '\';
else
    dirdelimiter = '/';
end

and

outputdir = fullfile(fileparts(full_fun_path),['include',dirdelimiter]);