calcF.m 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. function F = calcF(dax,dax_b,day,day_b,daz,daz_b,dvx,dvx_b,dvy,dvy_b,dvz,dvz_b,q0,q1,q2,q3)
  2. %CALCF
  3. % F = CALCF(DAX,DAX_B,DAY,DAY_B,DAZ,DAZ_B,DVX,DVX_B,DVY,DVY_B,DVZ,DVZ_B,Q0,Q1,Q2,Q3)
  4. % This function was generated by the Symbolic Math Toolbox version 6.1.
  5. % 15-Feb-2015 15:45:52
  6. t2 = dax.*(1.0./2.0);
  7. t3 = dax_b.*(1.0./2.0);
  8. t4 = t2-t3;
  9. t5 = day.*(1.0./2.0);
  10. t6 = day_b.*(1.0./2.0);
  11. t7 = t5-t6;
  12. t8 = daz.*(1.0./2.0);
  13. t9 = daz_b.*(1.0./2.0);
  14. t10 = t8-t9;
  15. t11 = q2.*t4.*(1.0./2.0);
  16. t12 = q1.*t7.*(1.0./2.0);
  17. t13 = q0.*t10.*(1.0./2.0);
  18. t14 = q2.*(1.0./2.0);
  19. t15 = q3.*t4.*(1.0./2.0);
  20. t16 = q1.*t10.*(1.0./2.0);
  21. t17 = q1.*(1.0./2.0);
  22. t18 = q0.*t4.*(1.0./2.0);
  23. t19 = q3.*t7.*(1.0./2.0);
  24. t20 = q0.*(1.0./2.0);
  25. t21 = q2.*t7.*(1.0./2.0);
  26. t22 = q3.*t10.*(1.0./2.0);
  27. t23 = q0.*t7.*(1.0./2.0);
  28. t24 = q3.*(1.0./2.0);
  29. t25 = q1.*t4.*(1.0./2.0);
  30. t26 = q2.*t10.*(1.0./2.0);
  31. t27 = t20-t21+t22+t25;
  32. t28 = -t17+t18+t19+t26;
  33. t29 = t14-t15+t16+t23;
  34. t30 = t11+t12-t13+t24;
  35. t31 = t17-t18+t19+t26;
  36. t32 = t20+t21-t22+t25;
  37. t33 = t11-t12+t13+t24;
  38. t34 = -t14+t15+t16+t23;
  39. t35 = q0.^2;
  40. t36 = q1.^2;
  41. t37 = q2.^2;
  42. t38 = q3.^2;
  43. t39 = -t35-t36-t37-t38;
  44. t40 = t14+t15+t16-t23;
  45. t41 = t11+t12+t13-t24;
  46. t42 = t20+t21+t22-t25;
  47. t43 = t17+t18+t19-t26;
  48. t44 = dvz-dvz_b;
  49. t45 = q0.*q2.*2.0;
  50. t46 = q1.*q3.*2.0;
  51. t47 = t45+t46;
  52. t48 = dvy-dvy_b;
  53. t49 = t35+t36-t37-t38;
  54. t50 = dvx-dvx_b;
  55. t51 = q0.*q3.*2.0;
  56. t53 = q1.*q2.*2.0;
  57. t52 = t51-t53;
  58. t54 = q0.*q1.*2.0;
  59. t58 = q2.*q3.*2.0;
  60. t55 = t54-t58;
  61. t56 = t35-t36+t37-t38;
  62. t57 = t51+t53;
  63. t59 = t35-t36-t37+t38;
  64. t60 = t54+t58;
  65. t61 = t45-t46;
  66. F = reshape([q3.*(q3.*(-1.0./2.0)+t11+t12+t13).*-2.0+q2.*(t14+t15+t16-q0.*t7.*(1.0./2.0)).*2.0+q1.*(t17+t18+t19-q2.*t10.*(1.0./2.0)).*2.0+q0.*(t20+t21+t22-q1.*t4.*(1.0./2.0)).*2.0,q0.*t41.*-2.0-q1.*t40.*2.0+q2.*t43.*2.0-q3.*t42.*2.0,q0.*t40.*-2.0+q1.*t41.*2.0+q2.*t42.*2.0+q3.*t43.*2.0,t47.*t48+t44.*t52,-t44.*t56-t48.*t55,-t44.*t60+t48.*t59,0.0,0.0,0.0,0.0,0.0,0.0,q0.*t30.*-2.0+q1.*t29.*2.0+q2.*t28.*2.0+q3.*t27.*2.0,q0.*t27.*2.0-q1.*t28.*2.0+q2.*t29.*2.0+q3.*t30.*2.0,q0.*t28.*-2.0-q1.*t27.*2.0-q2.*t30.*2.0+q3.*t29.*2.0,t44.*t49-t47.*t50,t44.*t57+t50.*t55,-t44.*t61-t50.*t59,0.0,0.0,0.0,0.0,0.0,0.0,q0.*t34.*-2.0+q1.*t33.*2.0-q2.*t32.*2.0-q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