how to plot figure of expression with `in RootOf`?

1 view (last 30 days)
i use ilaplace to get the output signal but how to plot the output signal `xt`
codes are as this
syms t s
gs=(5*s + 4)/(s^4 + 4*s^3 + 2*s^2 + 3*s);
us= laplace(sin(t + pi/6), t, s);
xs = us*gs;
xt = ilaplace(xs, s, t)
and the xt is
xt =
sin(t)/4 - (9*cos(t))/4 + (5*symsum(exp(r3*t)/(3*r3^2 + 8*r3 + 2), r3 in RootOf(s3^3 + 4*s3^2 + 2*s3 + 3, s3)))/4 + (7*3^(1/2)*symsum((r3*exp(r3*t))/(3*r3^2 + 8*r3 + 2), r3 in RootOf(s3^3 + 4*s3^2 + 2*s3 + 3, s3)))/12 + (2*3^(1/2))/3 + (35*symsum((r3*exp(r3*t))/(3*r3^2 + 8*r3 + 2), r3 in RootOf(s3^3 + 4*s3^2 + 2*s3 + 3, s3)))/4 - (3^(1/2)*cos(t))/4 - (5*3^(1/2)*symsum((r3^2*exp(r3*t))/(3*r3^2 + 8*r3 + 2), r3 in RootOf(s3^3 + 4*s3^2 + 2*s3 + 3, s3)))/12 - (9*3^(1/2)*sin(t))/4 + (95*3^(1/2)*symsum(exp(r3*t)/(3*r3^2 + 8*r3 + 2), r3 in RootOf(s3^3 + 4*s3^2 + 2*s3 + 3, s3)))/12 + (9*symsum((r3^2*exp(r3*t))/(3*r3^2 + 8*r3 + 2), r3 in RootOf(s3^3 + 4*s3^2 + 2*s3 + 3, s3)))/4
>>
so how to plot `xt` with `t`?
  3 Comments
dcydhb dcydhb
dcydhb dcydhb on 25 Dec 2019
but what is the relationship between MuPAD and the plot?
dcydhb dcydhb
dcydhb dcydhb on 25 Dec 2019
i just want to know if there is a way to plot `xt-t` if t=0:0.1:50 , and thanks a lot!

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 25 Dec 2019
Tt=0:0.1:50;
Y=double(subs(xt, t, Tt)) ;
plot(tt, Y)

Products


Release

R2014a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!