Having a table given by, let's say
data = {a,b,c,d},{e,f,g,h}
how can I update data
in a simple way
data = Something[data]
to display
data = {a,b,c,d, operation[a,b,c,d]},{e,f,g,h, operation[e,f,g,h]}
for a given function "operation
"?
Specifically, I'm finding solutions for an expression function == 1
using a RandomSearch
, but I'd like to display also the resulting value that is close to target
in each search:
target = 1
solutionCandidates =
Table[NMinimize[{Abs[(function[var1, var2, var3] -
target)^2], var1min < var1 < var1max, var2min < var2 < var2max, var3min < var3 < var3max}, {var1, var2, var3},
Method -> {"RandomSearch", "RandomSeed" -> i,
"SearchPoints" -> 10}], {i, 10}];
solutions = Select[solutionCandidates, #[[1]] < 10^-10 &][[All, 2]];