User Portlet User Portlet

Discussions
[mcode]Clear[Nb] int[m_, i_] := NIntegrate[m*i, {x, i, i + 1}] Nb[m_?NumericQ] := Table[int[m, i], {i, 1., 10}]; NMaximize[{Nb[m][[5]], 800 > Part::partw: Part 5 of Nb[m] does not exist. >> Part::partw: Part 5 of Nb[m] does not exist. >> ...
Hi, Can you tell me what is wrong with it ? Clear[Ntest] Ntest[m_?NumericQ] :=   Table[NIntegrate[m*i, {x, 0, 1}], {i, 1, 10}]; AbsoluteTiming[NMaximize[{Ntest[m][[2]], 500 > Part::partw: Part 2 of Ntest[m] does not exist. >> Part::partw: Part...