Question: Numerical Output from Procedure

<p>Good Morning Everybody,</p>
<p>I'm wondering what is wrong with the Maple code below, the worksheet works but Maple could not read L[1], L[2], L[3], and L[4] from the list param to give numerical solution. Would anyone be kind to tell me what is wrong with the code.</p>
<p>Regards,</p>
<p>restart:</p>
<p>n :=4</p>
<p> > n := 4;<br />
print(??); # input placeholder</p>
<p>> y := proc (n) local i, L, L1, f; global t; f := []; for i to n do L1 := L[i]^2*((1/8)*W[i]*L[i]+(1/3)*Q[i]*L[i]+(1/2)*M[i])/(E*`#msub(mi("I"),mi("sec",fontstyle = "normal"))`[i]); f := [op(f), L1] end do end proc;</p>
<p><br />
print(??); # input placeholder<br />
></p>
<p><br />
> Delta := proc (n) local i, L, L1, f, add; global t; f := []; add := 0; for i to n do add := add+L[i]; L1 := L[i]*add*((1/6)*W[i]*L[i]+(1/2)*Q[i]*L[i]+M[i])/(E*`#msub(mi("I"),mi("sec",fontstyle = "normal"))`[i]); f := [op(f), L1] end do end proc;<br />
print(??); # input placeholder<br />
print(??); # input placeholder</p>
<p>Parameters Of The Vessel<br />
> param := [E = evalf((30*144)*10^6*Unit('poundforce'/'ft'^2)), L[1] = 30.0*Unit('ft'), L[2] = 30.0*Unit('ft'), L[3] = 30.0*Unit('ft'), L[4] = 10*Unit('ft'), w[1] = 210.0*Unit('poundforce')/Unit('inch'), w[2] = 210.0*Unit('poundforce')/Unit('inch'), w[3] = 160.0*Unit('poundforce')/Unit('inch'), w[4] = 160.0*Unit('poundforce')/Unit('inch'), t[1] = (1/2)*Unit('inch'), t[2] = (5/8)*Unit('inch'), t[3] = (3/4)*Unit('inch'), t[4] = (1/2)*Unit('inch'), ID = 5*Unit('ft'), `#msub(mi("Q"),mn("1"))` = 0*Unit('poundforce'), `#msub(mi("M"),mn("1"))` = 0*Unit('poundforce'*'ft')];<br />
print(??); # input placeholder</p>
<p> </p>
<p>> W := simplify(eval([seq(w[i]*L[i], i = 1 .. n)], param));<br />
print(??); # input placeholder</p>
<p>> Shear := proc (n) local i, L, L1, f, add, w; global t; f := []; add := `#msub(mi("Q"),mn("1"))`; for i to n do add := add+w[i]*L[i]; L1 := add; f := [op(f), L1] end do end proc;<br />
print(??); # input placeholder</p>
<p>> R := evalf[4](simplify(eval([seq((1/2)*ID, i = 1 .. n)], param)));<br />
print(??); # input placeholder</p>
<p>> `#msub(mi("I"),mi("sec",fontstyle = "normal"))` := evalf[4](simplify(eval([seq(Pi*R[i]^3*t[i], i = 1 .. n)], param)));<br />
print(??); # input placeholder</p>
<p>> Q := Shear(n);<br />
%;</p>
<p>> `#msub(mi("Q"),mi("shear"))` := evalf[4](simplify(eval(Q, param)));<br />
%;</p>
<p>> Moment := proc (n) local i, L, L1, f, add; global t; f := []; add := `#msub(mi("Q"),mn("1"))`; for i to n do add := add+w[i]*L[i]; L1 := w[i]*L[i]*L[i]*(1/2)+add*L[i]; f := [op(f), L1] end do end proc;<br />
print(??); # input placeholder</p>
<p>> M := evalf[4](simplify(eval(Moment(n), param)));<br />
%;<br />
> NULL;<br />
%;<br />
The total deflection at the top of the vessel or column is</p>
<p>> Y := evalf[4](simplify(eval(y(n)+Delta(n)), param));<br />
 </p>
Please Wait...