How to fit data to a function with last output as input?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey, whats the easiest way to estimate the constants k1,k2,k3 in the function y:
y_n = k1 * x_n + k2 * x_(n-1) + k3 * y_(n-1)
I have an array of x and the desired y. I took a look at the optimization toolbox, but I dont know how to get it to work with last output/input as input.
Thanks for any suggestions!
0 commentaires
Réponse acceptée
Torsten
le 29 Juil 2016
A=zeros(N-1,3);
b=zeros(N-1);
A(:,1)=x(2:N);
A(:,2)=x(1:N-1);
A(:,3)=y(1:N-1);
b(1:N-1)=y(2:N);
k=A\b;
Best wishes
Torsten.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surrogate Optimization dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!