Clear Filters
Clear Filters

lookin for x(k)<u<=x(k+1)

1 view (last 30 days)
Luis Isaac
Luis Isaac on 15 Feb 2016
Answered: John D'Errico on 15 Feb 2016
Dear;
In matlab there is a function that could be used to locate the inverval (defined by a monotic incresing sucesion x(k)) where a variale u lies (<http://blogs.mathworks.com/loren/2008/08/25/piecewise-linear-interpolation/)>:
[k,k]=histc(u,x); % Gives k: x(k)<=u<x(k+1)
Is there a simple, like before, for looking the interval with condition x(k)<u<=x(k+1)
Thanks in advance;

Accepted Answer

John D'Errico
John D'Errico on 15 Feb 2016
Histc is still there. You can still use it. If you are worried that it will disappear on you (which will probably not happen for a few years yet, they do these things slowly and give you plenty of warning) then read the help for histc. That help tells you to use histcounts instead.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!