Question: save DirectSearch result

hello

1-DirectSearch results is like this:

[0.,[0.], [x = -.400000000000000], 11]


x=.4 is the answer of SolveEquations (code is in the second question) please interpret other terms.

2-how can i save only x?

this is my code:

restart;

a := Matrix([1, 2, 3, 4, 5]);

for k from 1 by 1 to 5 do

z = DirectSearch:-SolveEquations(a(1, k)*x+2 = 0)

end do

 

Please Wait...