lookin for x(k)<u<=x(k+1)
2 views (last 30 days)
Show older comments
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;
0 Comments
Accepted Answer
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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Specifying Target for Graphics Output in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!