extracting frequency from 3D Matrix
Show older comments
Hi everyone,
i need to extract the frequency from a "sine wave" from this matrix. As you can see all the freqencies are between 17.1 and 17.2 MHz. But what i need is to extract the frequency of that "sine wave" which is 1 Hz.

To make it a bit easer i made a simplified image using this code:
img = zeros(200, 600); %demo image
numperiods = 1;
amplitude = 50; %pixels
offset = 100;
x = 1:dt:size(img, 2); %pixel subsampling for better resolution
y = sin(x*2*pi/size(img, 2)*numperiods)*amplitude + offset;
img(sub2ind(size(img), round(y), round(x))) = 1;

It is important for me that in the end, i can see the extracted frequency in spectrogram. Do you guys have an idea how to do this?
Thanks
cheers
3 Comments
Rik
on 2 Oct 2020
I think the first step would be to extract the x,y data from the image. find with a threshold will probably do.
I don't have any good idea at this moment for how you could separate the several curves, but that should probably be next step, because after that the fitting of a sine will be trivial.
Ashkan Taremi Zadeh
on 6 Oct 2020
Rik
on 6 Oct 2020
Ok, good luck. If you want help you will have to show what you tried.
Answers (0)
Categories
Find more on Spectral Estimation 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!