Hi,
Can you tell me what is wrong with it ?
Clear[Nb]
Nb[m_?NumericQ] :=
Table[NIntegrate[i*m, {ebar, i, (i + 1)}], {i, 1., 10}];
NMaximize[{Nb[m], 800 <= m <= 1200}, {m}]
I have the following error :
NMaximize::nnum: The function value {-818.293,-1636.59,-2454.88,-3273.17,-4091.46,-4909.76,-5728.05,-6546.34,-7364.63,-8182.93}
is not a number at {m} = {818.293}. >>
I guess the problem comes from ?NumericQ, but I must put it (or the Integrand is non numerical for NMaximize)
Thank you,
Mich