From: Pavlos on
Hello,
I am interested in running a simple working example of the 'pdsimul' function.
So far I have managed to define an affined parameter dependent system via the use of 'psys' function. In particular, I wrote:

>> p = pvec('box', [1 3; 2 5]);
>> affsys = psys(p, [S0, S1, S2]);

where S0, S1 and S2 are system matrices.

The syntax of 'pdsimul' is the following:
(I have copied and pasted the matlab help content)

--------------------------------------------------------------------------------------------------------------
PDSIMUL Simulate P-systems along parameter trajectories

[T,X,Y] = PDSIMUL(PDS,'TRAJ',TF,'UT',XI,OPTIONS) simulates the (affine)
parameter-dependent system PDS along the parameter trajectory specified
by the function 'TRAJ'. The function PDSIMUL calls ODE15s to integrate
the time response of this linear time-varying system.

Without output arguments, PDSIMUL plots the output
trajectories.

Input:
PDS affine parameter-dependent system (see PSYS)
'TRAJ' name of the function p=TRAJ(t) specifying the
parameter trajectory. This function takes a time
t and returns a value p of the parameter vector.
TF final time for the integration (initial=0)
'UT' name of the input function u=UT(t). The default
is a step input.
XI initial state of the system (Default = 0)
OPTIONS control parameters for the ODE integration
(see ODESET)

Output:
T integration time points
X state trajectories (X(:,1) = first state, etc.)
Y output trajectories (Y(:,1) = first output, etc)

---------------------------------------------------------------------------------------------------------------

The last three input parameters can be omitted. THe major problem that I have encountered is the definition of the 'TRAJ' parameter. I have no idea how to do it.

If someone could help me with that, or could simply provide me with a simple working example of the 'pdsimul' function I would be obliged.

Thank you in advance for your precious support.