Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
The attached worksheet attempts to find the maximum of each line of two vectors and a single value. What needs to be done to make this work?
It's modeled after the answer from the following prior discussion: Minimize between vector and a single value
Solved! Go to Solution.
Here is the file with Richards suggestion of how to use your function along with an alternative approach using a function which returns simple the maximum of 3 scalars and then is called vectorized with the vectors as arguments. This function could also be used in the way you tried using the range i.
Regards
Werner
Your for loop starts at 0 and you have ORIGIN set to 1.
Thank you Richard; that is a good catch. No dice though.
You should be passing vectors to the function. If you pass, for example, l.dh[i,2, you are passing a scalar value
Here is the file with Richards suggestion of how to use your function along with an alternative approach using a function which returns simple the maximum of 3 scalars and then is called vectorized with the vectors as arguments. This function could also be used in the way you tried using the range i.
Regards
Werner