使用OCTAVE从不规则间隔的时间序列中获取周期 [英] Getting the period from irregularly-spaced time series using OCTAVE

查看:139
本文介绍了使用OCTAVE从不规则间隔的时间序列中获取周期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两列数据数组.第一列是时间(十进制的日期),第二列是信号强度.该图是三角波,或者应该是理想的,因为采样是不定时的.我尝试了许多方法来获取波动的周期,包括通过lsqcurvefit将正弦波拟合到数据,但是它并不总是返回正确的周期. 使用OCTAVE,如何获得此/任何不规则间隔时间序列的周期(我的主要目标)?查看情节

I have a two column array of data. First column is time (date in decimal years) and second column is the signal strength. The plot is a triangle wave or should be ideally because the sampling is irregularly timed. I've tried numerous methods to get the period of the wave, including fitting a sine wave to the data via lsqcurvefit, but it doesn't always return the right period. Using OCTAVE how do I get the period (my main aim) of this/any irregularly-spaced time series?See plot

推荐答案

找到了我自己问题的答案. lomb自定义函数(此处)是以下几种之一matlab Central,但是这一方法在OCTAVE中没有问题.

Found answer to my own question. The lomb custom function (here) is one of several at matlab central, but this one works without problems in OCTAVE.

[P,f,alpha] = lomb(M,date);
[maxpower,maxpowerindex] = max(P);
rightfreq = f(maxpowerindex);
Period = 1/rightfreq

这篇关于使用OCTAVE从不规则间隔的时间序列中获取周期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆