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:
CTFT using 'syms' ..... (Help needed)

Subject: CTFT using 'syms' ..... (Help needed)

From: Animesh Pandey

Date: 6 Apr, 2011 08:02:04

Message: 1 of 2

clc
syms t ;
w = 1;
f = @(t) heaviside(t)-heaviside(t-1);
f_t = int(f(t).*exp(-j*w*t), t, -Inf, Inf);
pretty(f_t);
ezplot(f_t);

I was trying CTFT using Symbolic Toolbox.

I am not getting correct answer using this code....
Could anybody please suggest changes in it ??

Thanx... ! :)

Subject: CTFT using 'syms' ..... (Help needed)

From: Nasser M. Abbasi

Date: 6 Apr, 2011 08:23:09

Message: 2 of 2

On 4/6/2011 1:02 AM, Animesh Pandey wrote:
> clc
> syms t ;
> w = 1;
> f = @(t) heaviside(t)-heaviside(t-1);
> f_t = int(f(t).*exp(-j*w*t), t, -Inf, Inf);
> pretty(f_t);
> ezplot(f_t);
>
> I was trying CTFT using Symbolic Toolbox.
>
> I am not getting correct answer using this code....
> Could anybody please suggest changes in it ??
>
> Thanx... ! :)


clc; clear all;
syms t w;
I=sqrt(-1);
f = @(t) heaviside(t)-heaviside(t-1);
H = int(f(t).*exp(-I*w*t), t, -Inf, Inf);
w=-8*pi:pi/10:8*pi;
plot(w,subs(H)); title('fourier transform (sinc function)')


--Nasser

Tags for this Thread

No tags are associated with 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