No BSD License  

Highlights from
Alternative Mathematics using MATLAB 7

image thumbnail

Alternative Mathematics using MATLAB 7



13 Mar 2003 (Updated )

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

% ex256.m: Direct and Inverse Transform of a Rectangular Pulse			
clear all
ns=1001;                      					% Number of samples 
A=1;  a=1e-2;								% Constants for function
tlim=2*a;  dt=2*tlim/(ns-1);  T=-tlim:dt:tlim ;         		
F=A*unitpulse(T, -a, a);         		% Square pulse
Nu=linspace(-500, 500, 200);  		% Frequency vector
G=sft(T, F, Nu);   						% Simple Fourier transform
W=2*pi*Nu;								% Angular frequency
G_ex=2*A*sin(a*W)./W;				% Analytic transform
figure(1),  plot( Nu,real(G),'b', Nu,imag(G),'r'),  grid on
   xlabel('frequency'),  ylabel('transform: real=blue')  

Ft=isft( Nu, G, T);           				% Inverse transform
figure(2),  plot( T,real(Ft),'b',  T,imag(Ft),'g',  T,F,'r'),  grid on
   xlabel('t'),  ylabel('inverse transform Ft, real=blue, original F=red')  

Contact us