2
$\begingroup$

I have the following problem solved in Mathematica

m=Table[For[i = 0, i <= .7, i = i + 0.1, 
  Print[NMinimize[{i*Abs[(E^-k*(N*p)^k)/k! - k^-g] + 
      i/3*Abs[p - N^-r] + (1 - (2*i)/3)*
       Abs[Log[N]/Log[N*p] - (A*Log[N - B] + CC)], A != 0, B != 0, 
     CC != 0, N > 0, k > 1, N <= 1000, k <= 100, N - k >= 0, 
     N - B > 0, BB, g > 2, g < 3, r > 0, r < 1, N^-r < 1, k/N < 1, 
     p <= 1}, {A, B, CC, N, k, g, r, p}, 
    Method -> "SimulatedAnnealing"]]], {j, 1}]

I want to turn it into a form which can be exportable to excel. I tried:

m//TableForm

but doesn't work. Can you please help me?

Thank you in advance

$\endgroup$
6
$\begingroup$

You should always try to post minimal working (or not working, but minimal anyway) examples:

m = Table[NMinimize[(x - i )^4 + (y - 2 i)^2 + 3 i, {x, y}], {i, 0, .7, .1}];
Export["c:\\test.xlsx", {#[[1]], x, y} /. #[[2]] & /@ m]

Mathematica graphics

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.