Phase spectrum without knowing frequency

Hi to Matlab Community!
I would appreciate if anyone knows if possible to phase a spectrum if you have only the x,y data. Namely if you look at the attached picture, I woyldl ike to ask you if there is any prossibilty to phase the below spectrum to look like the above???
Thnak you for your help!

 Accepted Answer

The lower trace appears to be the negative derivative of the upper trace.
So integrating the negative of the lower trace and adding a constant-of-integration could approximate the upper trace. With only an image and no vectors to experiment with, this is as close as I can get.

4 Comments

Thank you so much for your reply!!!
Please find the .mat file for both spectra!
I cannot see how could I phase the not phased spectrum!
Thank you again!
My pleasure.
Try this:
D = load('phase.mat');
Good = D.Good;
notphased = D.notphased;
int_np = cumtrapz(notphased(:,1), notphased(:,2)); % Integrate
IntConst = mean(Good(:,2) - int_np); % Calculate Constant Of Integration
figure
plot(Good(:,1), Good(:,2))
hold on
plot(notphased(:,1), notphased(:,2)./100)
plot(notphased(:,1), int_np)
plot(notphased(:,1), int_np+IntConst, '--r', 'LineWidth',1.5)
hold off
grid
legend('Original','Not Phased','Integrated Not Phased','Constant-Corrected Integrated Not Phased', 'Location','SE')
producing:
Phase spectrum without knowing frequency.png
THANK YOU SO MUCH!!!!
As always, my pleasure!

Sign in to comment.

More Answers (0)

Asked:

on 15 Aug 2019

Commented:

on 15 Aug 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!