No BSD License  

Highlights from
Alternative Mathematics using MATLAB 7

image thumbnail

Alternative Mathematics using MATLAB 7

by

 

13 Mar 2003 (Updated )

Self-instructive text on undergraduate algebra, statistics, differential and integral calculus.

ex262.m
% ex262.m:  Modfied Fast Fourier Transform of a Gaussian  		                      
clear all,  echo off,  hold off,  close all
ns=2^12,  A=1;  a=50;				
tlim=10*a;  dt=2*tlim/(ns-1);  T=-tlim:dt:tlim ;         	
F=A*exp(-T.^2/ a^2);					% Target function 
[Nu, G]=mfft(T, F);   					% Modified fast Fourier transform
W=2*pi*Nu;  								% Angular frequency
Gex= A*sqrt(pi)*a*exp(-W.^2/4*a^2);		% Analytic G 
figure(1),  plot( Nu,real(G),'bo', Nu,imag(G),'r*', Nu,Gex,'g'),  grid on
   xlabel('frequency'),  
   ylabel('real(G)=circle, imag(G)=star, Gex=curve')
   axis([-0.02 0.02 get(gca,'Ylim')]) 

Contact us