%% L02_Fourier %% ============== %% Function to find Fourier-transform using Matlab symbolic toolbox. %% %% Created : 15 July 2005 %% Modified : 15 July 2005 %% %% Copyright (c) 2005 Salman Durrani . %% ------------------------------------------------------------ %% clear matlab memory clear all; clc syms f x w syms a b w0 real %% Take Fourier Transform %% Example 1: Unit step u[n] f = heaviside(x); Ans1=maple('fourier',f,x,w) pretty(Ans1) %% Example 2: f = exp(-x^2); Ans2=maple('fourier',f,x,w) pretty(Ans2) %% Example 3: f = sin(w0*x); Ans3=maple('fourier',f,x,w) pretty(Ans3) %% Take Inverse Fourier Transform %% Example 1: F = 1/(a+i*w); Ans1=maple('invfourier',F,w,x) pretty(Ans1) %% Example 2: F = 1/(a+i*w)^2; Ans2=maple('invfourier',F,w,x) pretty(Ans2)