T O P I C R E V I E W |
kumarb |
Posted - 04/29/2011 : 12:02:17 AM I have the dataset column which has the samples of sine wave.I need to find the cycles of the sine wave programmatically(either in origin c or labtalk)from the column values.The sine wave either start from 0 deg or 180 deg phase shift & it might have some straight/Ramp line in the beginning. Kindly let me know the solution.
Kumar B |
6 L A T E S T R E P L I E S (Newest First) |
Stephen.herbert |
Posted - 08/02/2011 : 05:39:53 AM Can not you just traverse the x axis and count the amount of moments the y worth is zero? The frequency may be the number of zeros divided by two. I appear to recollect undertaking something related in Matlab some ages again.
|
couturier |
Posted - 07/17/2011 : 04:19:02 AM How about some FFT, that will return frequency (max value of spectrum). The number of cycle can thereafter be found with the lenght of the signal. |
thentangler |
Posted - 07/14/2011 : 5:56:35 PM I too have a similar problem. Is there a way to do it? Penn gave a very nice suggestion, but unfortunately there is no option to calculate the phase in the non linear fit. Please help Thank You |
kumarb |
Posted - 05/09/2011 : 10:09:18 AM quote: Originally posted by miketeavey
Can't you simply traverse the x axis and count the number of times the y value is zero? The frequency is the number of zeros divided by two. I seem to remember doing something similar in Matlab some years back.
Yes that method will work for simple sine wave.But my problem is the sine wave might have phase shift(we can't count the # times y-value is <=0) & some straight/Ramp line in the beginning of the cycle.
Kumar B |
miketeavey |
Posted - 05/05/2011 : 08:55:16 AM Can't you simply traverse the x axis and count the number of times the y value is zero? The frequency is the number of zeros divided by two. I seem to remember doing something similar in Matlab some years back. |
Penn |
Posted - 05/02/2011 : 11:18:22 PM Hi Kumar B,
Maybe you can perform nonlinear fit on the data with the sine function to get the corresponding parameter of the sine function, and then you can calculate the cycle by using this sine function.
Penn |