Linked Questions

10
votes
1answer
1k views

Is there a built-in function to do binary search?

Is there a built-in function to do binary search? Say, given a list (sorted) and a number, find the position which keeps the listed sorted when the number is inserted. I know that ...
3
votes
3answers
321 views

Zero-order interpolation not going fully around

Connected to this question, I want to do a zero-order interpolation of a bunch of datapoints which is periodic. The code I use is as follows: ...
3
votes
3answers
1k views

For-loop not working as I expect

I want to do this: When 10 <= t < 130, give t -> 1; When 130 <= t<300, give <...
2
votes
4answers
249 views

Find time since last 0 in list

When I have a list of data (measured per day), is it possible to define a function that gives the nr of days since the data has been 0? I tried working withPosition...
3
votes
1answer
1k views

List plot joined with stair steps instead of diagonal lines

What's a simple way to plot a list of points so that they're joined with stair steps instead of straight lines between the points? I'd imagine something like... ...
9
votes
3answers
631 views

ListPlot InterpolationOrder->0 datapoint centered

it is possible to get a histogram style in ListPlot using InterpolationOrder->0 ...

15 30 50 per page