How to get occurrence frequency of the signal?

Hi Everybody,
I faced difficulty regarding to get the occurrence frequency of my signal. The data are in .xls format and the column which I want to get the frequency is called "s" and I want only get frequency for those greater than 0.2. Time is define in another column. Could you please help me?
Any help would be highly appreciated.

2 Comments

Can you please clarify, you have time-domain data in one column and the corresponding times in another column (in your spreadsheet).
When you say you only want the frequency for those greater than 0.2, what is the 0.2 (some frequency value), or are you referring to the amplitude of the signal (the value in time)?
s4 data are s4 index with sampling rate 50 Hz but those are greater than 0.2 consider as event which I want to analyse it. So I need to know the frequency of s4 index. Please let me know if it's not clear.

Sign in to comment.

Answers (1)

freq=xlsread(filename.xls,A1:A11)
aa=find(freq>0.2)
answer=freq(aa)
in above code column A1:A10 contain freq.you can take any

7 Comments

Thank you. Could you please guide me to use in this code? I want frequency of s4.
data=xlsread('1608_1.xls');
data_filterr=find(data(:,25)>60);
data_filtered=data(data_filterr,:);
elev_cutof20=find(data_filtered(:,6)>=15);
data_cutoff15=data_filtered(elev_cutof20,:);
r=data_cutoff15(:,2);
time=(r./3600)-(24*1);
s4r=data_cutoff15(:,8);
s4cor=data_cutoff15(:,9);
s4=sqrt(s4r.^2-s4cor.^2);
PRN=data_cutoff15(:,3);
what is problem in above code?
I do not know where should I put the frequency,
aa=find(s4>0.2);
answer=freq(aa);
plot (answer);
In which column of xls file you have specified frequency?
in my code if you have written frequency in column A1 :A11 then you will get frequency above '0.2' in variable 'answer'
Sorry was my mistake, just now I realize I do not know the exact column number of s4 but when I check by Matlab show me s4 as a column so I would like to know how to match with above code. I want to get the frequency of s4 and non of the columns are define as a frequency so I should find the frequency first and then plot it?
you have need clarification.
whether s4 is a single value... what is s4?....then which data are in your xls file if you read xls file then some data should in xls file.
s4 is a integer number with sampling rate 50Hz that compute using two column of my data and in the .xls file I have time. should I use this relation?(f=1/T). Frequency is the number of repeating events vs time, right? basd on this how can I compute it?

Sign in to comment.

Asked:

Ara
on 22 Mar 2013

Community Treasure Hunt

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

Start Hunting!