Inverse Laplace and plotting system respone
3 views (last 30 days)
Show older comments
Hello, I am having some issues with plotting function I get from inverse Laplace transformation. It is a linear controlling system with input step signal.
syms s
A = 1+1/(103*s);
B = (0.33/s)/(1-0.33/s);
C = 0.0875/s;
n = A*B*C;
d = 1 - (A*B*C);
r = 1/s; %step function
tf = (n/d)*r
h = ilaplace(tf)
ezplot(h, [1,1000]), axis square, grid on
This is what i get.
tf =
-(231*(1/(103*s) + 1))/(8000*s^3*((231*(1/(103*s) + 1))/(8000*s^2*(33/(100*s) - 1)) + 1)*(33/(100*s) - 1))
h =
- 8240*sum(-(33*r3*exp(r3*t) - 100*r3^2*exp(r3*t))/(- 2472000*r3^2 + 543840*r3 + 23793), r3 in RootOf(s3^3 - (33*s3^2)/100 - (231*s3)/8000 - 231/824000, s3)) - 1
??? Error using ==> char
Cell elements must be character arrays.
Error in ==> ezplot at 158
fmsg = char(f);
Error in ==> sym.ezplot at 56
h = ezplot(char(f),varargin{:});
Error in ==> laplace2 at 26
ezplot(h, [1,1000]), axis square, grid on
>>
Can please someone help me with that? I have to plot the system response.
Thanks.
0 Comments
Answers (1)
Walter Roberson
on 19 Dec 2012
Try
ezplot(matlabFunction(h), [1,1000])
or just
t = linspace(1,1000,500); %500 is number of samples to plot
hfun = matlabFunction(h);
plot(t, hfun(t));
0 Comments
See Also
Categories
Find more on Dynamic System Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!