Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Symbolic Laplce transform

Subject: Symbolic Laplce transform

From: evan um

Date: 2 Aug, 2011 20:37:08

Message: 1 of 4

Hi,

I hope that I can have your comments on how to correctly implement symbolic laplace transform. For example, my Laplace transform matlab script follows.

syms t sig t0;
f=2/sqrt(3*sig)/pi^0.25*(1-(t-t0)^2/sig^2)*exp(-(t-t0)^2/2/sig^2);
f_LFTed=laplace (f)

I expect the results such as f_LFTed=function of only s. However, the result is given as
(9007199254740992*3^(1/2)*(sig^2*laplace(1/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) - t0^2*laplace(1/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) + 2*t0*laplace(t/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) - laplace(t^2/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s)))/(17987404344949797*sig^(5/2))
In other words, the result still has laplce transfrom function. I can not evaluate the result. Can you explain how to get the complete Laplace transform result? In advace, thank you very much for reading this question.

Evan
 

Subject: Symbolic Laplce transform

From: Nasser M. Abbasi

Date: 3 Aug, 2011 00:04:42

Message: 2 of 4

On 8/2/2011 1:37 PM, evan um wrote:
> Hi,
>
> I hope that I can have your comments on how to correctly implement symbolic laplace transform.
>For example, my Laplace transform matlab script follows.
>
> syms t sig t0;
> f=2/sqrt(3*sig)/pi^0.25*(1-(t-t0)^2/sig^2)*exp(-(t-t0)^2/2/sig^2);
> f_LFTed=laplace (f)
>
> In other words, the result still has laplce transfrom function. I can not evaluate the result.
> Can you explain how to get the complete Laplace transform result? In advace, thank you very much for reading this question.
>
> Evan
>

It looks like it can't do the exp part in your expression, which is this:

EDU>> f=exp(-(t-t0)^2);
EDU>> f_LFTed=laplace (f)
  
f_LFTed =
  
laplace(1/exp((t - 3)^2), t, s)

I tried this part only in Mathematica, and this is what I got:

In[19]:= f=Exp[-(t-t0)^2]
In[20]:= LaplaceTransform[f,t,s]

Out[20]= 1/2 E^(1/4 s (s-4 t0)) Sqrt[Pi] Erfc[1/2 (s-2 t0)]

If you have the Matlab extended symbolic toolbox, try it with it, may be you'll
get better result.

--Nasser

Subject: Symbolic Laplce transform

From: Greg Heath

Date: 3 Aug, 2011 05:39:08

Message: 3 of 4

"evan um" wrote in message <j19n5k$h2u$1@newscl01ah.mathworks.com>...
> Hi,
>
> I hope that I can have your comments on how to correctly implement symbolic laplace transform. For example, my Laplace transform matlab script follows.
>
> syms t sig t0;
> f=2/sqrt(3*sig)/pi^0.25*(1-(t-t0)^2/sig^2)*exp(-(t-t0)^2/2/sig^2);
> f_LFTed=laplace (f)
>
> I expect the results such as f_LFTed=function of only s. However, the result is given as
> (9007199254740992*3^(1/2)*(sig^2*laplace(1/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) - t0^2*laplace(1/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) + 2*t0*laplace(t/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) - laplace(t^2/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s)))/(17987404344949797*sig^(5/2))
> In other words, the result still has laplce transfrom function. I can not evaluate the result. Can you explain how to get the complete Laplace transform result? In advace, thank you very much for reading this question.
>
> Evan

Have you tried just

(1-t^2)*exp(-t^2)

Hope this helps.

Greg_

Subject: Symbolic Laplce transform

From: Greg Heath

Date: 5 Aug, 2011 13:05:04

Message: 4 of 4

"Greg Heath" <heath@alumni.brown.edu> wrote in message <j1amts$daa$1@newscl01ah.mathworks.com>...
> "evan um" wrote in message <j19n5k$h2u$1@newscl01ah.mathworks.com>...
> > Hi,
> >
> > I hope that I can have your comments on how to correctly implement symbolic laplace transform. For example, my Laplace transform matlab script follows.
> >
> > syms t sig t0;
> > f=2/sqrt(3*sig)/pi^0.25*(1-(t-t0)^2/sig^2)*exp(-(t-t0)^2/2/sig^2);
> > f_LFTed=laplace (f)
> >
> > I expect the results such as f_LFTed=function of only s. However, the result is given as
> > (9007199254740992*3^(1/2)*(sig^2*laplace(1/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) - t0^2*laplace(1/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) + 2*t0*laplace(t/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s) - laplace(t^2/exp((t^2 - 2*t*t0 + t0^2)/(2*sig^2)), t, s)))/(17987404344949797*sig^(5/2))
> > In other words, the result still has laplce transfrom function. I can not evaluate the result. Can you explain how to get the complete Laplace transform result? In advace, thank you very much for reading this question.
> >
> > Evan
>
> Have you tried just
>
> (1-t^2)*exp(-t^2)

This is what i get from Matlab 6.5

  close all, clear all, clc
 
 syms t
 f = (1-t^2)*exp(-t^2);
 F = laplace (f)
 fhat = ilaplace(F)
 
% Command line Answers
%
% F = 1/4*pi^(1/2)*exp(1/4*s^2)*erfc(1/2*s)...
% -1/8*pi^(1/2)*s^2*exp(1/4*s^2)*erfc(1/2*s)...
% +1/4*s*exp(1/4*s^2)*exp(-1/4*s^2)
%
% fhat = -(-1+t^2)*exp(-t^2)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% However,

syms s
fhat2 = ilaplace(1/4*pi^(1/2)*exp(1/4*s^2)*erfc(1/2*s)...
    -1/8*pi^(1/2)*s^2*exp(1/4*s^2)*erfc(1/2*s)...
    +1/4*s*exp(1/4*s^2)*exp(-1/4*s^2) )
 
% Command line Answer
%
% ??? Error using ==> erfc
% X must be real.

I checked the documentation and all of the erf
related function are only defined for real arguments

Hope this helps.
 
Greg_

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us