How to get the max value from a self define function?

As the picture above, I want to get the max value for the function K,under a certain condition, but the max() return the value like a matrix,so how can I get the right value?

As the picture above, I want to get the max value for the function K,under a certain condition, but the max() return the value like a matrix,so how can I get the right value?
Ahh! So far I had overlooked that you just used the first value of vector Q when you tried to apply the "max" function, not the full vector.
So you are only interested in the maximum value of K for m=6 and Q=0.2.
This can be done the way you had tried. Just 2 corrections:
1) You have to define F as a vector, not a range
2) You must apply vectorization (the arrow over the expression)

actually just the function call of K must be vectorized

This gives you the max value of K, but does not reveal the corresponding F-value.
You could use the "match" function to get the index of the max values and calculate the F-value from this:


As already written in a previous answer you could also use the derivative to get F a bit more accurate.

BTW, in case you are not using Prime 11, the "vec" function is not available. But its easy to create your own "vec" function:

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.