If MaxIterations is reached ,such as ''NMinimize::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations. '', I have tried to increase the MaxIterations number, but it still not converge. Does it has any return value so as to Exclude the unwanted data?
code: (* Xq is a function of kz and ky*)
kztemp = Range[0.1, Pi, 0.1];
len = Length[kztemp];
kytemp = Table[0, {len}];
For[h1 = 1, h1 <= len,
h1++, {Xqtemp = Xq /. {kz -> kztemp[[h1]]},
temp = ky /.
Last[NMinimize[{Abs[Xqtemp], -Pi < ky < Pi}, ky,
MaxIterations -> 10000]] , kytemp[[h1]] = temp}];
Thank you vary much!