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.

26 lines
648 B

9 years ago
  1. filedata='maggio11_1731';
  2. str=['load ' filedata '.dat'];eval(str);
  3. str=['x=' filedata '(:,1);'];eval(str);
  4. str=['y=' filedata '(:,2);'];eval(str);
  5. filestr='Caf2_maggio11_1757_strum';
  6. str=['load ' filestr '.dat'];eval(str);
  7. str=['xs=' filestr '(:,1);'];eval(str);
  8. str=['ys=' filestr '(:,2);'];eval(str);
  9. ys=ys/max(ys);
  10. x0=-0.4;
  11. ysI=interp1((xs+x0)*1,ys,x,'linear',0);
  12. % t0=0;
  13. % w=12;
  14. % A=1
  15. % ysI=A*(exp(-2*log(2)*(x-t0).^2/w^2));
  16. figure(1)
  17. semilogy(x,y,x,ysI); xlim([-100 100]);ylim([1e-5 2])
  18. f=(0:1:length(x)-1)*1/(length(x)-1)*1/((x(2)-x(1))*3e-5);
  19. Rw=-imag(fft(y)./fft(ysI));
  20. figure(2)
  21. plot(f,Rw,f,Rw*0);xlim([0 2000]);ylim([-0.05 3])