LS method in idetification ,control engeeniring
Mostrar comentarios más antiguos
Hi,how are you?I have problem with that code,is about LS method with ARX model in identification,I should use xcorr command for EPS variable to compare it that how much is near to white noise ?
4 comentarios
Sulaymon Eshkabilov
el 12 de Mayo de 2024
You should be a bit more clear with your question. Follow these guidelines:
saeed
el 12 de Mayo de 2024
saeed
el 12 de Mayo de 2024
Respuestas (1)
Aastha
el 1 de Oct. de 2024
Hi saeed,
As I understand, you want to compare the error variable “Eps" between “Y” and “Y_hat” with the white noise realization “e” using the "xcorr" function in MATLAB. This can be done using the following code snippet:
[cross_corr, lags] = xcorr(Eps, e, 'normalized');
You may refer to the link of MathWorks documentation for further information on “xcorr” function. Here is the link to it:
The "xcorr" function computes the cross correlation between “Eps” and "e”. The "normalised" argument normalizes the sequences so that the autocorrelations at zero lag is equal to 1.
The function returns two variables, first one is “lags” which contains all the lags at which cross correlation has been computed and the second variable “cross_corr” contains the corresponding cross correlation values.
You can visualize the cross relation using the "stem" function in MATLAB. The code snippet below illustrates the same:
stem(lags,c);
For more information on “stem” function, you may refer to the documentation link below:
I hope this helps!
Categorías
Más información sobre Correlation and Convolution en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
