where on campus
professional price, many companies,
student version about $100
philosophy of absolutr minimal typing
only one basic data structure: matrices (and modern objects)
for anyone w/o lin alg experience, think of rectangular tables of numbers
note: case sensitivity
compare role of : versus ; and = versus :=
Y=[0 7 0 9 2 0 0 0]'
plot only the points provided, make table, conect dots (no fancy
interpolation as in MAPLE that adaptively adds more points...)
help plot (as opposed to ?)
buttons and slide show are created/programmed in MATLAB!
try out grafix, visualization -- note tyhe extremely compact code to create these!
try out matrices, basic operations -- need to learn all these!!!
search for functions, e.g. fft
scroll down to example, block, and CNTRL C,
back in command window
script (versus function), m-files
save script file in TEMP as fft1.m
edit script (delete or comment out the comments....)
back in command window
undefined, need to define path
arrange windows to be nonoverlapping: command, editor, grafix
download (save to disk, c:\temp) data-file current.m
edit the script, to use our own data
i.e. replace defn's of t, x, y by:
leave remainder as is, or change number of points included in 2nd plot
execute script from command window fft1
interpret plots -- what do these show? (ck)
just a very few lines of simple code to define data, fft extremely fast
this is what professionals use .... not integration by parts!!!
in our class, want to get a little feel for what is behind the method
(very naive numwerical integration, no effort made for speed, also
trying to use very basic commands for beginners)
start from scratch in new script
% first enter the data
% technically this should be T=(t(N)-t(1))*N/(N-1)
% calculate the first integral -- the average value!
% In general one should carefully discuss whether the period is N or (N-1)
% and thus include both / exclude one of the endpoints....
% create values of cos/sin/exp -- start from inside out!
% -- note no fuss about complex numbers.... they are the standard!
% e1 = [1 : 512]'
% e1 = 2*pi*i*/512*[1 : 512]'
e1 = exp( - 2*pi*i/512*[1 : 512]')
em1 = exp( 2*pi*i/512*[1 : 512]')
% check graphically, either way that this appears OK (one period)
% multiply function values and values of exponential, and integrate the product
% form the approximant and overlay plot
%clear the grafix, and set to overlay=mode
Continue on your own -- or use sep7.m as