How to do phase sensitive detection on data?
2 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have created a modulating fake spectra with three components A, B and C and added some noise to it. Now I want to do phase sensitive detection by using the formula 2/t*integral(A(t)*sin(f*t+phaseshift). I wrote the following code:
for j=1:1:L2 %Run demodulation routine for each phaseshift phaseshift=degtorad(ph(j));
for i = 1:1:L %Do demodulation at each wavenumber of the spectra
noisysigatonewav(:,i)=data1(i,:);%create vector with all measurements of given wavenumber as f(t) from row of original data
dm=noisysigatonewav(:,i)*sin((Fc*t)+phaseshift);
tempdemod=2*trapz(t,dm)/periodofdata1; %Demodulate using given values
tempdemoddata(i,:)=tempdemod; %write demodulated data to row of matrix
end
v=genvarname('demoddata', who); %create a new matrix for all the demodulated data for a given phase shift
eval([v '= tempdemoddata;'])%write all data from tempdemoddata to the new matrix for a given phase shift
end
So peaks due to A,B and C should vanish at different phaseshifts but in my code it is vanishing at the same value. Please advise me as to what is the problem with my code.
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で PHY Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!