I'm trying to get the output of a system and plot it.
I have the Transfer function of the system and I use simulink
to simulate it. I use only three blocks: "Step" as the entrance signal, "Transfer Fcn" is the transfer function,and in the ouput I put a "scope" block. It's a third-order system so when using the command
[t,y]=sim('mdl file name')
y is a vector of three components.
But I want to plot the ouput of the system (as a scalar function of the time). When I double click the scope block in simulink I get only one function, how can I get this graph through matlab?
and what are the vector components I do get? I guess they are the state variables but how do I construct the output using them?
thanks a lot!