ways to calculate non-linear correlation between two time series in MATLAB?
39 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mir Sahand
el 8 de Ag. de 2024 a las 9:27
Respondida: Star Strider
el 8 de Ag. de 2024 a las 11:24
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 comentarios
Respuestas (1)
Star Strider
el 8 de Ag. de 2024 a las 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 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!