You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
723 B

filedata='maggio11_1731';
str=['load ' filedata '.dat'];eval(str);
str=['x=' filedata '(:,1);'];eval(str);
str=['y=' filedata '(:,2);'];eval(str);
filestr='Caf2_maggio11_1757_strum';
str=['load ' filestr '.dat'];eval(str);
str=['xs=' filestr '(:,1);'];eval(str);
str=['ys=' filestr '(:,2);'];eval(str);
ys=ys/max(ys);
x0=-0.4;
ysI=interp1((xs+x0)*1,ys,x,'linear',0);
% t0=0;
% w=12;
% A=1
% ysI=A*(exp(-2*log(2)*(x-t0).^2/w^2));
figure(1)
semilogy(x,y,x,ysI); xlim([-100 100]);ylim([1e-5 2])
f=(0:1:length(x)-1)*1/(length(x)-1)*1/((x(2)-x(1))*3e-5);
Rw=-imag(fft(y)./fft(ysI));
figure(2)
plot(f,Rw,f,Rw*0);xlim([0 2000]);ylim([-0.05 3])
if 0,
AA=[f' Rw]; str=['save fft.dat AA -ascii;'];eval(str);
end;