index error for find function
2 views (last 30 days)
I am trying to find the value of Signal_fft_hilbert at the values of newf. But i get the error:
??? Attempted to access Signal_fft_hilbert(14.6484); index must be a positive integer or logical.
I want to find the value at exactly 14.6484. How can I find the value?
Iain on 6 Mar 2014
Ok, it looks like you've got a vector "Signal_fft_hilbert", which I'm going to call "v".
If want v(14.6484). The only way you can get v(14. ... ) is if you interpolate.
doc interp1 % will tell you all about one function for interpolation.
Alternatively, if you want the v that corresponds to something having a value you could do something like:
v( time == 14.684324)
v(find(time > 14.00))