You are on page 1of 1

%% data1

% data1=new; data2=old;
Fs1=12*(10^5);
n=3;

i=1;fig=1;
while fig==1

if i==3
i=4;

elseif i==5
fig=0;
end
data1=eval(['ae' num2str(i)]);
[r1 co1]=size(data1);
L1=r1;
Y1=fft(data1,L1)/L1;
fre1=((Fs1)*0.5)*linspace(0,1,(L1)/2);
subplot(n,1,j)
plot(fre1,abs(Y1(1:(L1)/2)),'-b') %abs because of negtive
title(['the power spectrum of ae' num2str(i) 'using linear-linear scale'])
xlabel('Frequency(Hz)')
ylabel('power')
axis([45000,400500,0,0.025]);
grid on
i=i+1;
j=j+1;
end

You might also like