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

Wayne King
Wayne King 2013년 3월 22일
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)?
Ara
Ara 2013년 3월 22일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

vipul utsav
vipul utsav 2013년 3월 22일

0 개 추천

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

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);
vipul utsav
vipul utsav 2013년 3월 22일
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);
vipul utsav
vipul utsav 2013년 3월 22일
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'
Ara
Ara 2013년 3월 22일
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?
vipul utsav
vipul utsav 2013년 3월 23일
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.
Ara
Ara 2013년 3월 23일
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?

댓글을 달려면 로그인하십시오.

카테고리

질문:

Ara
2013년 3월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by