Say I have a vector:
Is there any way to access values with any intermediate index? For example x(2.5)=17.5 or x(1.37)=10.55? I realise I could interpolate or calculate it by ratios. I'm looking for the easiest way to do this.
I'm also looking for the other way around. Say I have a strictly increasing vector, is there any way to find position of a value? For example
Is there a function such that: function(y, 3) = 1.5. (Is there any way to do this if it isn't strictly increasing/decreasing?)