Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
If I have a vector A and B both with 10 elements. How can i create a vector C that has the minimum values of A or B on each corresponding position.
Thanks in advance !
Solved! Go to Solution.
Use vectorization.
But as min can't be vectorized, we have to write our own min function, calling the built in min.
Use vectorization.
But as min can't be vectorized, we have to write our own min function, calling the built in min.
Short, simple and clear . Thank you very much
Is there any good reason why min (and max, and mean and stdev) can't be vectorized?
I think all the above answers for the xxx1, 2 and 3 functions are OK, so they could (should!) have been produced by vectorizing the original function immediately.
Luc
I, too, can't think of any good reason why min and max should not allow vectorization.
I see you've given that a thorough thought. 🙂
Luc