The solution to the ODE contains an exponential term of the form
Imagine you were to instead write this in the form
which is just a slight re-arrangement of the Maths.
What would the value of s be?
(Remember, the marking system considers all answers within a few % of the true value as being correct, so don't worry too much about the number of decimal places. Do take care to keep track of signs. No unit is
required.)
For Signals and Systems it is sometimes useful to write the solution in terms of this value of s, rather than the time constant, as well find that s is the Laplace variable and our different ways of solving an ODE all give
the same solution, if written a little differently.
QUESTION 8
You can plot the solution of the ODE, the impulse response of the system in this case as the input was an impulse, by using the command:
>> fplot(h)
fplot is a command used for plotting mathematical functions in Matlab, like the exponential equation we have here.
fplot is intended to make plotting easy, for quick visualisation. However, by default it plots the function between-5 and 5 on the x axis, which isn't enough to see the impulse response in this case. Type
>> help fplot
and Matlab will display the help for this function. By reading the help, and speaking to a demonstrator if you need further assistance, ask Matlab to plot the response between-1 and 20 on the x axis.
You can then label your axes using the commands
>>xlabel('Time /s')
>>ylabel'Impulse response h(t))
(Note that when you copy and paste the character (the single quote) sometimes it is not recognised correctly by Matlab, as there are lots of different styles of quote symbol. If it is highlighted in red, just delete the
symbol and type it in by hand.)
You can explore your plot using the tools in the plotting window. These are at the top right of the plot, but are only shown when your mouse is in the plotting window (which is quite poor user interface design!).
Figure 1
Elle Edit View Insert Icols Desktop Window Help
SCIENT
response h(t)
0.3
0.25
02
0.15
X 1.864
Y 0.1791
ACOQQN
Cata Tips
X
CI
C
Fig: 1