Hi, my task is to calculate some parameters connected with a sattelite. I'm almost done but there is one error I'm not able to solve. Here is a part of my code:
if true % code
endu = 1;Ek(u) = Mk;while 1 u = u + 1; Ek(u) = Mk + e*sin(Ek(u-1)); if abs(Ek(u) - Ek(u-1)) < 5e-5 break; end Ek = Ek(u); end
When I run my script this info appears in the Command Window: Index exceeds matrix dimensions.
Error in wsp_xyz_satelity (line 41) Ek(u) = Mk + e*sin(Ek(u-1));
Does anyone have an idea why it occures? I have done many while loops before in the same way and never came across a mistake like that. Thank You for your advice in advance đŸ™‚
Best Answer