Result ilaplace a number

Hi,
from this code:
a=55/4/sym('s^2');
b=ilaplace(a);
I got:
(55*t)/4
How can I get result like 13,75*t????
Thanks

Antworten (2)

Azzi Abdelmalek
Azzi Abdelmalek am 29 Jul. 2013

0 Stimmen

double(coeffs(b))

5 Kommentare

john
john am 30 Jul. 2013
Hm...but if:
b=(55*t+4*t^2+3*t^3+2+exp(t))/4;
thant I get: 0.5000 0.2500 13.7500 1.0000 0.7500
But how can I use this result? How can I connect individual result to the responding variable? Or how can I create result in form:
0.5+0.25*exp(t)+13.75*t+t^2+0.75*t^3
Thank you
Azzi Abdelmalek
Azzi Abdelmalek am 30 Jul. 2013
Bearbeitet: Azzi Abdelmalek am 30 Jul. 2013
syms t
b=(-55*t+4*t^2+3*t^3+2+exp(t))/4
[ii,jj]=coeffs(b)
s=[]
for k=1:numel(ii)
s=[s sprintf(['%0.5g*' char(jj(k)) '+'],double(ii(k))) ]
end
s(end)=[]
s=regexprep(s,'+-','-')
s=regexprep(s,'*1','')
john
john am 30 Jul. 2013
[1, t] means always exp(t)?
Azzi Abdelmalek
Azzi Abdelmalek am 31 Jul. 2013
what do you mean?
john
john am 1 Aug. 2013
In variable "b" exist exp(t)/4...but result is 0.25*[1, t]....so [1, t] means always expression "exp(t)"?

Melden Sie sich an, um zu kommentieren.

RahulTandon
RahulTandon am 7 Jul. 2015

0 Stimmen

a=55/4/sym('s^2'); b=ilaplace(a); vpa(b) % this will give you the complete answer!

Tags

Gefragt:

am 29 Jul. 2013

Beantwortet:

am 7 Jul. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by