![]() I don know why I'm getting 0 at the beginning of every array like delta_theta. But my question is how can i check if really every statement is checked with MATLAB during this for loop. I also know maybe a lot of problem is in my code now, which if someone notice it would vary appreciate to mention it. MATLAB doesn't have conditional expressions, but in some situations you can get a similar effect by saying, e.g., var condtrueexpr + (1-cond)falseexpr.Unlike C's conditional expression, this will of course always evaluate both trueexpr and falseexpr, and if cond happens not to be either 0 or 1 (note: false behaves like 0 true behaves like 1) you'll get crazy results. But I am not sure if the if or elseif statement is working properly. ![]() ![]() I am really new to MATLAB and I am trying to write this code.
0 Comments
Leave a Reply. |