How to find unwrapped phase of a cross-spectral at frequencies of 0.1 0.2 0.3 ... 0.9 Hz?
Show older comments
Hello everyone. I am new to matlab and also to the signal processing. I have to find the unwrapped phase of the cross-spectral. I have two signals with the sampling frequency of 100Hz. I have taken the fft of the signals and cross correlated them in frequency domain to make cross-spectral. Now the thing I am looking for is to find the unwrapped phase of the cross-spectral and plot its values against frequencies of 0.1 0.2 0.3 upto 0.9 Hz. The first colum of the text files of the signals is time and the second column is for the corresponding amplitude. Can someone guide me about that?
sig1 = readtable("total.txt");
sig2 = readtable("HAK_PHA_2017_11_26.txt");
s1 = table2array(sig1);
s2 = table2array(sig2);
L1 = length(s1);
L2 = length(s2);
F1 = fft(s1(:,2));
F2 = fft(s2(:,2));
Cross_spectral = corr(F1,F2)
6 Comments
Mathieu NOE
on 2 Sep 2022
hello
please attach your data files with the paperclip button
all the best
Faisal
on 3 Sep 2022
Walter Roberson
on 3 Sep 2022
Note: to get rid of the warnings, floor(Samples/2) -- you are encountering the case where Samples is odd, so Samples/2 is giving "something plus 1/2" as a result.
Faisal
on 3 Sep 2022
Walter Roberson
on 3 Sep 2022
Okay, live with the warnings if you want. It doesn't matter to me.
Accepted Answer
More Answers (0)
Categories
Find more on Time-Frequency Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
