ways to calculate non-linear correlation between two time series in MATLAB?
39 次查看(过去 30 天)
显示 更早的评论
Hi all
I need MATLAB functions or codes for calculating the non-linear relation of two time series and I have the statistics toolbox (R2022b)
I appreciate your help!.
0 个评论
回答(1 个)
Star Strider
2024-8-8,11:24
Your question is ambiguous.
First, be certain that both time series are sampled at the same time points. You can use interp1 for this, although the Signal Processing Toolbox resample function is more appropriate, especially if you want to do signal processing on your data. Creating them to have the same sampling frequency as well as sharing the same time points will also make any subsequent analysis easier.
Second, choose an approach.
One option could be to use the System Identification Toolbox to create an input-output relation between the two time series. You could then calculate a transfer function between tthem. (The Signal Processing Toolbox has similar capabilities.)
Another approach could simply be to divide one by the other in the time domain.
Still another would be to use the polyfit function to create a polynomial fit between the dependent variables of the two time series. A version of that approach would create a mathematical model of the relationship and then do a non-linear fit to it using the fitnlm function.
It all depends on the result you want. Defining that (and providing the data for both time series) would be helpful.
.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!