This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
optimization [2018/09/18 10:43] mark.naves |
optimization [2020/06/07 16:30] marijn.nijenhuis |
||
---|---|---|---|
Line 6: | Line 6: | ||
<code matlab run_sim.m> | <code matlab run_sim.m> | ||
- | function cost = run_sim(P, Silent)% EXAMPLE SCRIPT FOR RUNNING SPACAR LIGHT | + | function |
if nargin == 1 | if nargin == 1 | ||
Silent = true; %run in silent mode when called by optimizer | Silent = true; %run in silent mode when called by optimizer | ||
Line 60: | Line 60: | ||
eprops(1).orien | eprops(1).orien | ||
eprops(1).nbeams | eprops(1).nbeams | ||
- | eprops(1).flex | + | eprops(1).flex |
eprops(1).color | eprops(1).color | ||
eprops(1).opacity | eprops(1).opacity | ||
Line 116: | Line 116: | ||
%show results | %show results | ||
- | run_sim(x_opt, | + | [cost, out] = run_sim(x_opt, |
</ | </ | ||
//Note: prescribing input rotation is only supported for SPACAR light version 1.27 or higher.// | //Note: prescribing input rotation is only supported for SPACAR light version 1.27 or higher.// |