Skip to main content
16-Pearl
November 27, 2015
Solved

Mixing 'on Error' and 'otherwise'?

  • November 27, 2015
  • 3 replies
  • 1407 views

To all

Is it possible to "mix" on Error and otherwise? I am trying to find a value in a vector using a match function,

If the value is not found do an linear interpolation

Else

get the rank of the value  (in vector 1)

return a value at that rank in another vector

Attached test function which works if all the vectors are the same length but not with different length. It looks like the On error does; not quite work are it seems that the rank is always zero


Best answer by ValeryOchkov

To J B from all

must-be-in.png

3 replies

24-Ruby IV
November 27, 2015

To J B from all

must-be-in.png

16-Pearl
November 27, 2015

Thanks Valery. I have just spotted that and was going to post an updated wsheet. You beat me to it

24-Ruby IV
November 27, 2015

You welcome!

(1) - it is a vector not scalar!

I use in same cases the Trace Error command and the Return operator.