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.
 
 
 

27 lines
649 B

filedata='maggio13_1045';
str=['load ' filedata '.dat'];eval(str);
str=['x=' filedata '(:,1);'];eval(str);
str=['y=' filedata '(:,2);'];eval(str);
filestr='caf2_maggio13_1134_strum';
str=['load ' filestr '.dat'];eval(str);
str=['xs=' filestr '(:,1);'];eval(str);
str=['ys=' filestr '(:,2);'];eval(str);
ys=ys/max(ys);
x0=-40;
ysI=interp1((xs+x0)*1.0,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 2])