On 4/14/2011 10:19 PM, Animesh Pandey wrote:
> clc;
> clear all;
> syms t w s;
> I=sqrt(1);
> f = @(t) exp(t)*heaviside(t);
> H = int(f(t).*exp(I*w*t), t, Inf, Inf);
> l = int(f(t).*exp(s*t), t, 0, Inf); % error point
> pretty(H);
> pretty(l);
>
> w=8*pi:pi/10:8*pi;
> plot(w,subs(H), 'r');
> grid
>
> s=8*pi:pi/10:8*pi;
> figure, plot(s, subs(l), 'r');
> grid
>
> I am getting an error at the mentioned part ....
> I do not wish to use laplace() !
> Please help !
> Thanks.....
Making life too hard for yourself.
If you want to use laplace, just use laplace.
You are also confusing numerical notations in symbolic expressions.
If you want to explicitly integrate it, you need to
at least tell Matlab that w is in the left side of the plane,
else the integral is not convergent. using assuming w negative...
But why do all this? Just use Laplace:

clc;
clear all;
syms t s w;
I = sqrt(1);
f = exp(t)*heaviside(t);
H = laplace(f);
w = 8*pi:pi/10:8*pi;
H = subs(H,s,I*w);
subplot(2,1,1);
plot(w,abs(H), 'r');
title('magnitude');
grid
subplot(2,1,2);
plot(w,angle(H), 'r');
title('phase');
grid

Nasser
