0
$\begingroup$

I have the following code that works for one input, but I'd like to evaluate it for all elements in a vector of entries. I have checked that it works for the individual entries of the vector but want it to evaluate for the vector as a whole and give individual solutions as a vector. Is there a way to do this?

zmin[a_?NumericQ] :=  NSolveValues[a*z^2 - 1 == 0 && -10 < z < 10, z][[1]]
zmin[0.3]
avals := Subdivide[0, 1, 10]
zmin[avals]
$\endgroup$
2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.