Please debug this code for me...
Mostrar comentarios más antiguos
alpha=10;
D1B2B3=18.3;
B3B2B1=41.34;
B1B2P1=16.13;
B1B3=2767;
B1B2=1612;
F8=64172;
F6=-68189;
F7=21073;
F9=(F8*B1B2*sind(D1B2B3+B3B2B1)+F6*B1B3*sind(alpha)-F7*B1B3*cosd(alpha))/B1B2*sind(B1B2P1);
zero=F8*B1B2*sind(D1B2B3+B3B2B1)+F6*B1B3*sind(alpha)-F7*B1B3*cosd(alpha)-F9*B1B2*sind(B1B2P1)
Its a part of a long program I've written and after lot of debugging, I realised that this is the fault. I've found the value of F9 using a particular equation, and when I substitute it back in the same equation, it doesn't give me zero! I've tried it in C++ too but still no zero. Can someone tell me why? Is it precision error, or have I made some silly error?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!