Code covered by the BSD License  

Highlights from
Using Analytical Tools to Gain Insight and Speed-up Num. Analysis in MATLAB & Symbolic Math Toolbox

image thumbnail

Using Analytical Tools to Gain Insight and Speed-up Num. Analysis in MATLAB & Symbolic Math Toolbox

by

 

28 Jan 2013 (Updated )

files from the webinar

helper.totalDistance(RocketStartTime,EngineOffTime,Chute1Time,Chute2Time)
function out1 = totalDistance(RocketStartTime,EngineOffTime,Chute1Time,Chute2Time)
%TOTALDISTANCE
%    OUT1 = TOTALDISTANCE(ROCKETSTARTTIME,ENGINEOFFTIME,CHUTE1TIME,CHUTE2TIME)

%    This function was generated by the Symbolic Math Toolbox version 5.9.
%    06-Nov-2012 14:36:46

t157 = EngineOffTime.*3.1569e4;
t153 = -t157;
t148 = -t153;
t144 = -t148;
t139 = -t144;
t135 = -t139;
t130 = -t135;
t125 = -t130;
t120 = -t125;
t116 = -t120;
t108 = -t116;
t104 = -t108;
t97 = -t104;
t95 = -t97;
t90 = -t95;
t86 = -t90;
t82 = -t86;
t80 = -t82;
t73 = -t80;
t69 = -t73;
t64 = -t69;
t60 = -t64;
t52 = -t60;
t48 = -t52;
t43 = -t48;
t34 = -t43;
t21 = -t34;
t2 = -t21;
t158 = RocketStartTime.*-2.9325e4;
t154 = -t158;
t149 = -t154;
t145 = -t149;
t140 = -t145;
t136 = -t140;
t131 = -t136;
t126 = -t131;
t121 = -t126;
t117 = -t121;
t109 = -t117;
t105 = -t109;
t98 = -t105;
t96 = -t98;
t91 = -t96;
t87 = -t91;
t83 = -t87;
t81 = -t83;
t74 = -t81;
t70 = -t74;
t65 = -t70;
t61 = -t65;
t53 = -t61;
t49 = -t53;
t44 = -t49;
t35 = -t44;
t22 = -t35;
t3 = -t22;
t4 = t2+t3+3.575e6;
t5 = 1.0./t4;
t6 = RocketStartTime.*5.0031e4;
t7 = t6+3.405875e8;
t8 = sqrt(t7);
t9 = RocketStartTime.*5.1e12;
t10 = t9-1.625e16;
t11 = 1.0./t10;
t12 = RocketStartTime.*t8.*t11.*2.5808718787e10;
t13 = EngineOffTime.*1.0323063e7;
t14 = RocketStartTime.*-8.855487e6;
t15 = t13+t14+1.553695e10;
t16 = 1.0./sqrt(t15);
t17 = EngineOffTime.*-1.57845e12;
t18 = RocketStartTime.*1.35405e12;
t19 = t17+t18+3.575e14;
t20 = 1.0./t19;
t23 = sqrt(t15);
t24 = t21+t22-3.575e6;
t25 = 1.0./sqrt(t24);
t26 = sqrt(t24);
t27 = RocketStartTime.*t20;
t28 = cosh(t12);
t29 = 1.0./t28;
t30 = sinh(t12);
t31 = t8.*t16.*t29.*t30.*3.8297084312;
t32 = atanh(t31);
t33 = EngineOffTime.*t20.*-1.0;
t36 = Chute2Time.*1.000000000000066;
t37 = t34+t35+3.575e6;
t38 = 1.0./t37;
t39 = t16.*t32.*6.7449166071e-9;
t40 = t27+t33+t39;
t41 = t23.*t40.*1.482598019e8;
t42 = tanh(t41);
t45 = t43+t44-3.575e6;
t46 = 1.0./sqrt(t45);
t47 = sqrt(t45);
t50 = t48+t49+3.575e6;
t51 = 1.0./t50;
t54 = t52+t53-3.575e6;
t55 = 1.0./sqrt(t54);
t56 = sqrt(t54);
t57 = EngineOffTime.*-2.869909090909091e11;
t58 = RocketStartTime.*2.665909090909091e11;
t59 = t57+t58+3.25e13;
t62 = t60+t61+3.575e6;
t63 = 1.0./t62;
t66 = t64+t65-3.575e6;
t67 = 1.0./sqrt(t66);
t68 = sqrt(t66);
t71 = t69+t70+3.575e6;
t72 = 1.0./t71;
t75 = t73+t74-3.575e6;
t76 = 1.0./sqrt(t75);
t77 = sqrt(t75);
t78 = RocketStartTime.*1.46625e12;
t79 = t17+t78+1.7875e14;
t84 = t82+t83-3.575e6;
t85 = 1.0./sqrt(t84);
t88 = t86+t87+3.575e6;
t89 = 1.0./t88;
t92 = t90+t91-3.575e6;
t93 = 1.0./sqrt(t92);
t94 = sqrt(t92);
t99 = t97+t98-3.575e6;
t100 = 1.0./sqrt(t99);
t101 = EngineOffTime.*-3.1569e12;
t102 = RocketStartTime.*2.9325e12;
t103 = t101+t102+3.575e14;
t106 = t104+t105+3.575e6;
t107 = 1.0./t106;
t110 = t108+t109-3.575e6;
t111 = 1.0./sqrt(t110);
t112 = sqrt(t110);
t113 = EngineOffTime.*-1.57845e11;
t114 = RocketStartTime.*1.46625e11;
t115 = t113+t114+1.7875e13;
t118 = t116+t117+3.575e6;
t119 = 1.0./t118;
t122 = t120+t121-3.575e6;
t123 = 1.0./sqrt(t122);
t124 = sqrt(t122);
t127 = Chute2Time.*9.999999999999012e-1;
t128 = t125+t126+3.575e6;
t129 = 1.0./t128;
t132 = t130+t131-3.575e6;
t133 = 1.0./sqrt(t132);
t134 = sqrt(t132);
t137 = t135+t136+3.575e6;
t138 = 1.0./t137;
t141 = t139+t140-3.575e6;
t142 = 1.0./sqrt(t141);
t143 = sqrt(t141);
t146 = t144+t145+3.575e6;
t147 = 1.0./t146;
t150 = t148+t149-3.575e6;
t151 = 1.0./sqrt(t150);
t152 = sqrt(t150);
t155 = t153+t154+3.575e6;
t156 = 1.0./t155;
t159 = t157+t158-3.575e6;
t160 = 1.0./sqrt(t159);
t161 = sqrt(t159);
out1 = real(t79.*log(tanh(t68.*(Chute1Time.*t63.*2.0e-8+t67.*(atanh(tanh(t68.*(Chute1Time.*t63.*1.0e-8-t67.*(atanh(t23.*t42.*t67.*3.910309435e-2)-EngineOffTime.*t67.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t67.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9)+1.0)).*3.0025974027e-11-real(t79.*log(tanh(t77.*(Chute2Time.*t72.*2.0e-8+t76.*(atanh(tanh(t77.*(Chute1Time.*t72.*1.0e-8-t76.*(atanh(t23.*t42.*t76.*3.910309435e-2)-EngineOffTime.*t76.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t76.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9)+1.0)).*3.0025974027e-11-real(t103.*log(tanh(sqrt(t84).*(t85.*(atanh(t23.*t42.*t85.*3.910309435e-2)-EngineOffTime.*t85.*3.7915107323e1).*2.6374711048e-10-(Chute1Time.*1.0e-8)./(t80+t81+3.575e6)).*3.791510732e9)+1.0)).*2.7296340026e-11+real(t103.*log(tanh(sqrt(t99).*(t100.*(atanh(t23.*t42.*t100.*3.910309435e-2)-EngineOffTime.*t100.*3.7915107323e1).*2.6374711048e-10-(EngineOffTime.*1.0e-8)./(t95+t96+3.575e6)).*3.791510732e9)+1.0)).*2.7296340026e-11+real(t59.*1.0./sqrt(EngineOffTime.*3.1569e4-RocketStartTime.*2.9325e4-3.575e6).*(t36+t26.*atanh(tanh(t26.*(Chute2Time.*t5.*2.0e-8+t25.*(atanh(tanh(t26.*(Chute1Time.*t5.*1.0e-8-t25.*(atanh(t23.*t25.*t42.*3.910309435e-2)-EngineOffTime.*t25.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t25.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.6243703514e-2-t26.*atanh(t25.*1.402692023610576e3).*1.624370351399893e-2)).*1.334936916616496e-8+real(log(tanh((RocketStartTime.*t8.*2.580871878863181e-1)./(RocketStartTime.*5.1e1-1.625e5))+1.0).*(RocketStartTime.*3.062649350455096-9.758441557822609e3))-real(EngineOffTime.*t23).*4.0469499643e-3-real(RocketStartTime.*t8).*1.54986383988395e-2+real(RocketStartTime.*t23).*4.0469499643e-3-real(t59.*log(tanh(t134.*(t123.*(atanh(t111.*7.367299441366222e2)+t111.*(Chute2Time+t124.*atanh(tanh(t124.*(Chute2Time.*t119.*2.0e-8+t123.*(atanh(tanh(t124.*(Chute1Time.*t119.*1.0e-8-t123.*(atanh(t23.*t42.*t123.*3.910309435e-2)-EngineOffTime.*t123.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t123.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.6243703514e-2-t124.*atanh(t123.*1.4026920236e3).*1.6243703514e-2).*4.4459404231e1).*2.474167207200244e-9+t129.*(t127+t134.*atanh(tanh(t134.*(Chute2Time.*t129.*2.0e-8+t133.*(atanh(tanh(t134.*(Chute1Time.*t129.*1.0e-8-t133.*(atanh(t23.*t42.*t133.*3.910309435e-2)-EngineOffTime.*t133.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t133.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.62437035139984e-2-t134.*atanh(t133.*1.4026920236e3).*1.62437035139984e-2+t134.*atanh(t133.*7.3672994414e2).*2.249242915636364e-2).*1.1e-7).*4.041764021e8)+1.0)).*3.002597402521401e-10-real(t59.*t85.*(t127+t94.*atanh(tanh(t94.*(Chute2Time.*t89.*2.0e-8+t93.*(atanh(tanh(t94.*(Chute1Time.*t89.*1.0e-8-t93.*(atanh(t23.*t42.*t93.*3.910309435e-2)-EngineOffTime.*t93.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t93.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.62437035139984e-2-t94.*atanh(t93.*1.4026920236e3).*1.62437035139984e-2+t94.*atanh(t93.*7.3672994414e2).*2.249242915636364e-2)).*1.334936916616496e-8+real(t115.*log(tanh(t161.*(t160.*(atanh(tanh(t161.*(Chute2Time.*t156.*2.0e-8+t160.*(atanh(tanh(t161.*(Chute1Time.*t156.*1.0e-8-t160.*(atanh(t23.*t42.*t160.*3.910309435e-2)-EngineOffTime.*t160.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t160.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.204159457793851)+Chute2Time.*t160.*6.1562315462e1).*3.248740702799786e-9+Chute2Time.*t156.*2.0e-7).*3.0781157733e8)+1.0)).*2.0707568293e-10+real(t19.*log(tanh(t32.*1.0)+1.0)).*2.7296340022e-11-real(t19.*log(tanh(t23.*(t27+t33+t16.*t32.*6.744916607095507e-9).*1.482598019e8)+1.0)).*2.7296340022e-11-real(t115.*log(tanh(t152.*(t151.*(atanh(tanh(t152.*(Chute2Time.*t147.*2.0e-8+t151.*(atanh(tanh(t152.*(Chute1Time.*t147.*1.0e-8-t151.*(atanh(t23.*t42.*t151.*3.910309435e-2)-EngineOffTime.*t151.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t151.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.204159457793851)+Chute2Time.*t151.*6.1562315462e1).*3.248740702799786e-9+t138.*(t36+t143.*atanh(tanh(t143.*(Chute2Time.*t138.*2.0e-8+t142.*(atanh(tanh(t143.*(Chute1Time.*t138.*1.0e-8-t142.*(atanh(t23.*t42.*t142.*3.910309435e-2)-EngineOffTime.*t142.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t142.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.6243703514e-2-t143.*atanh(t142.*1.402692023610576e3).*1.624370351399893e-2).*2.0e-7).*3.0781157733e8)+1.0)).*2.0707568293e-10+real(t59.*log(tanh(t56.*(t55.*(atanh(t46.*7.367299441366222e2)+t46.*(Chute2Time+t56.*atanh(tanh(t56.*(Chute2Time.*t51.*2.0e-8+t55.*(atanh(tanh(t56.*(Chute1Time.*t51.*1.0e-8-t55.*(atanh(t23.*t42.*t55.*3.910309435e-2)-EngineOffTime.*t55.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t55.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.6243703514e-2-t56.*atanh(t55.*1.4026920236e3).*1.6243703514e-2).*4.4459404231e1).*2.474167207200244e-9+t38.*(t36+t47.*atanh(tanh(t47.*(Chute2Time.*t38.*2.0e-8+t46.*(atanh(tanh(t47.*(Chute1Time.*t38.*1.0e-8-t46.*(atanh(t23.*t42.*t46.*3.910309435e-2)-EngineOffTime.*t46.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t46.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.6243703514e-2-t47.*atanh(t46.*1.402692023610576e3).*1.624370351399893e-2).*1.1e-7).*4.041764021e8)+1.0)).*3.002597402521401e-10+real(Chute1Time.*t79.*t133).*1.53506952344e-9-real(Chute2Time.*t79.*t133).*1.53506952344e-9+real(Chute2Time.*t111.*t115).*1.2748058518e-8+real(Chute1Time.*t103.*t133).*1.0349436615e-9-real(EngineOffTime.*t103.*t133).*1.0349436615e-9-real(t100.*t115.*(t36+t112.*atanh(tanh(t112.*(Chute2Time.*t107.*2.0e-8+t111.*(atanh(tanh(t112.*(Chute1Time.*t107.*1.0e-8-t111.*(atanh(t23.*t42.*t111.*3.910309435e-2)-EngineOffTime.*t111.*3.7915107323e1).*2.6374711048e-10).*3.7915107323e9).*1.3483997249)+Chute1Time.*t111.*5.1124720286e1).*3.9120018434e-10).*2.5562360143e9).*1.2041594578).*1.6243703514e-2-t112.*atanh(t111.*1.402692023610576e3).*1.624370351399893e-2)).*1.2748058518e-8;

Contact us