Question: Matlab program incorporating in MAPLE and finding fourier coefficients....

Hi all, 

I need help to run a MATLAB program in MAPLE and find the fourier series coefficients like a0, an, bn.........the matlab code is as follows:                ( to be honest i don't know what format to use in MAPLE for programming?)

clear

step=2*pi/2000;

theta=0:step:2*pi;

start_point1=pi/3+pi/6;

duration1=pi/3;

start_point2=4*pi/3-pi/6;

duration2=pi/3;

 x=zeros(length(theta),1);

x(fix(start_point1/step):fix(start_point1/step+duration1/step))=2;

x(fix(start_point2/step):fix(start_point2/step+duration2/step))=1;

 figure,plot(theta,x)

data=repmat(x,[100,1]);

 figure,plot(abs(fft(data)))

Thanks in advance

A.Q

Please Wait...