Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Hi all, I've created a vector value as shown below
does anyone know how to create an 'if statement' to get the min/max results for these two vectors?
Your help is kindly appreciated
Solved! Go to Solution.
You don't need an if statement:
this works for me. Thank you Alan!
Similar to my suggestion in your other thread (pass/fail) you could use vectorization
I'm sorry, I couldn't help it. I just had to generalize the problem. What if I had more than two vectors, I thought, or even multiple arrays of differing lengths and column sizes? Fortunately, this is an exercise in cat-skinning. Here's one method that pays homage to my dislike of explicit iteration. It's not totally functional because I thought such an approach would make the technique more obscure.
And now the rubber of the functions meets the tarmac of the data ...
Seems to work, as did a few nst2mat test cases using arrays of differing row and column sizes (see worksheet).
Stuart
this also works fine for me. Thank you Werner!