Closed fietew closed 6 years ago
Try:
SFS_start; conf = SFS_config; conf.plot.useplot = true; SOFAstart; irs = get_ir(dummy_irs(1024,conf),[0,0,0],0,[1 0 0], 'cartesian',conf); [b1,a1] = butter(5,0.1); [b2,a2] = butter(10,0.2); sig1 = filter(b1,a1,irs(:,1)); sig2 = filter(b2,a2,irs(:,1)); sig = [irs(:,1), sig1, sig2]; [amp, phase, f] = spectrum_from_signal(sig,1,conf); sig_inv = signal_from_spectrum(amp, phase, f, 1,conf); figure, plot(sig,'k'); hold on plot(sig_inv, '--'); hold off; [amp, phase, f] = spectrum_from_signal(sig,conf); sig_inv = signal_from_spectrum(amp, phase, f, conf); figure, plot(sig,'k'); hold on plot(sig_inv, '--'); hold off; [amp, phase, f] = spectrum_from_signal(sig.',2,conf); sig_inv = signal_from_spectrum(amp, phase,f,2,conf); figure, plot(sig,'k'); hold on plot(sig_inv.', '--'); hold off;
Looks good! Should we adjust the test script?
Should be fine without adjusting the test script, I will merge this now.
Try: