Obtain Time Domain Signal From Frequency Domain Signal
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a respiration signal which was curve fitted using fourier8. Then the psd of the curve fitted signal was calculated using welch method.
I have changed the frequency of the signal in frequency domain. Now, I am trying to plot the signal with new frequency, but can't figure out how to proceed.
Here is my code,
clc clear all
load 'resp.mat';
t = [1:1:18000]./300;
Fs = 300;
resp_signal = resp(1:18000,:); % Respiration Signal for 60 sec
[resp_f,gof,output] = fit(t',resp_signal,'fourier8'); % Curve fitted respiration signal
y_resp = resp_f(t);
psig1 = y_resp - mean(y_resp);
[pxx1,w1] = pwelch(psig1,[],[],[],Fs);
figure
plot(w1,pxx1);
axis([0 10, 0 100]);
[~,loc1] = max(pxx1);
freq1 = w1(loc1);
resp_rate1 = freq1 * 60;
bp = input('Enter Respiration Rate: ');
bps = bp * 17.068;
Fss = bps;
psig2 = y_resp - mean(y_resp);
[pxx2,w2] = pwelch(psig2,[],[],[],Fss);
figure
plot(w2,pxx2);
axis([0 10, 0 200]);
[~,loc2] = max(pxx2);
freq2 = w2(loc2);
resp_rate2 = freq2 * 60;
I am trying to convert 'pxx2' variable into time domain signal. I would be really grateful, if anyone could help me out with this.
1 comentario
Adam
el 17 de Jul. de 2017
doc ifft
would normally be used for this, though I have never used pwelch so I'm not really familiar with what it gives you.
Respuestas (0)
Ver también
Categorías
Más información sobre Parametric Spectral Estimation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!