Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
5b36ae19f9
I'm expecting the output, (1,0), but the if statement won't accept a non-scalar value next to the operator (input). I can do the operation on each value in the input vector separately, like this... 5b36ae19f9
and 5b36ae19f9
but the if statement can't be vectorised with my attempts. Any help would be appreciated...
0812ea038d
but this appears to only yield the last of the loop's results, so output = 0 and not (1,0) how do I put each of the loop results into the appropriate location in the output vector? Thanks again for helping me with what's probably a stupidly simple question.