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

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 7월 29일

0 개 추천

double(coeffs(b))

댓글 수: 5

john
john 2013년 7월 30일
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 2013년 7월 30일
편집: Azzi Abdelmalek 2013년 7월 30일
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 2013년 7월 30일
[1, t] means always exp(t)?
Azzi Abdelmalek
Azzi Abdelmalek 2013년 7월 31일
what do you mean?
john
john 2013년 8월 1일
In variable "b" exist exp(t)/4...but result is 0.25*[1, t]....so [1, t] means always expression "exp(t)"?

댓글을 달려면 로그인하십시오.

RahulTandon
RahulTandon 2015년 7월 7일

0 개 추천

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

카테고리

태그

질문:

2013년 7월 29일

답변:

2015년 7월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by