How to find the period time of a signal if given only one period of the signal ?
3 views (last 30 days)
Show older comments
Hi,
I am a begginer in matlab and i suppose it's a relatively simple question, I have a question which I have to find the period time but it's given to me only the signal itself and more precisely one period of the signal so how can I find the length of this signal ? Is there maybe any function ? And also just to know for the next time how do we find the period time when it's not just given one period ?
I looked on google and this forum but the answers weren't very precises.
Thanks
0 Comments
Answers (1)
Image Analyst
on 4 Apr 2021
If the entire length of the signal is known to be exactly one period, then the period is the length of the signal
period = length(signal);
If you have separate time or x vector and a separate signal or y vector, then the period is the distance between the first and last element.
period = x(end) - x(1); % or t(end) - t(1)
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!