[continued from poste above]
I have solved the problem by modifying the line to;
>> s.x = s.x + K' * (s.z-s.H*s.x); %added transpose of K
This was required as my observance vector (z) was a 2X1 matrix(and so is K and hence they couldn't be multiplied). Although the calculation now works I am still wondering why it doesnt work with the original code.
Comment only