Hello,
I would like suggestions on how to make the search below more efficient. I concatenate in another script to obtain numeric strings eg 0120001410. I then use the search function below to search for 0110001110 in row 1 obtain the corresponding value in row 2. Can I use logical indexing for this, if so, how.
function y= binge(x)binge= [00000001, 00000010, 00000020, 00000021, .........,90000000; 0.11111, 2.4433, ..................................,7.2];i=1;length=size(binge,2);while i<=length if abs(x-binge(1,i))<10e-5 y=binge(2,i); break; end i=i+1;endif (i>length) error('wrong');endend
Thanks MN
Best Answer