Hi Guys,
I'm a beginner in Matlab and still don't know many syntax. I wanted to know if it's possible to do a for loop with two formula?
let's say I have
P0=[10 15;15 20]; %which is the initial Pk
O=[1 1;0 1];
H=[1 1;2 1];
R=[10 15;15 20];
and I need to solve and loop the formulas of:
Pk(-)=O*Pk*O.'+O
Kk=Pk*H.'*inv(H*Pk*H.'+R)
Pk(+)=(1-Kk*H)*Pk
I'm not sure how to loop these formula since I also have to put my initial value Pk=P0 (which was given) or is there a different syntax I need to know?
Thank you so much for your help
Best Answer