Plotting and Evaluating PROPT Results

From TomWiki
Revision as of 03:31, 19 September 2011 by Per (talk | contribs) (Created page with "After solving a problem with PROPT, you will probably want to evaluate and/or plot the results. In PROPT, state and control variables (tomStates and tomControls) are functions o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

After solving a problem with PROPT, you will probably want to evaluate and/or plot the results.

In PROPT, state and control variables (tomStates and tomControls) are functions of a set of coefficients, and of time.

For example, let's create a couple of states:

>> toms t
>> setPhase(tomPhase('p',t,0,1,10))
>> tomStates x y

We can see how x is constructed by converting it into m-code:

>> [code, tempD] = mcode(x)
 
code =
 out      = interp1p(tempD{1},x_p,t);
 
tempD = 
   [11x1 double]

So x depends on time t and on the coefficient vector x_p