Linked Questions

2
votes
2answers
56 views

How to Create an Efficient Step Function from Data

I have list of rules from where a DateListStepPlot can be created to visualize the problem: ...
3
votes
2answers
74 views

Insert two random time points to data

I have a data as following. I want to add two random time points, one for birth one for death. ...
1
vote
2answers
136 views

How to interpolate my results at discrete steps? [closed]

I have the results ...
1
vote
2answers
94 views
30
votes
6answers
5k views

Finding all elements within a certain range in a sorted list

Suppose we have a sorted list of values. Let's use list = Sort@RandomReal[1, 1000000]; for this example. I need a fast function ...
10
votes
7answers
2k views

How to plot a list to look like step function?

Suppose I have the following simple list. l = {0,2,5,9,14}; I want to to make a plot that looks like the figure below. I.e. I want to have a horizontal line ...
13
votes
8answers
2k views

Given an ordered set S, find the points in S corresponding to another list

Given a sorted list of numbers $S$, I want to create a function that accepts a list of numbers $L$ and for each number $l \in L$ it returns the index of the largest number $s \in S$ such that $s<l$....
23
votes
1answer
2k views

Gillespie Stochastic Simulation Algorithm

The Gillespie SSA is a Monte Carlo stochastic simulation algorithm to find the trajectory of a dynamic system described by a reaction (or interaction) network, e.g. chemical reactions or ecological ...
6
votes
2answers
306 views

Adding a piece-wise function and its shifted version by list manipulations

I have a piecewise function represented by two lists, x= {0, 30, 60, 120, 150, 180}; y= {0, 1, 0, -1, 0}; and the plot of this function is . Now I would like ...
5
votes
4answers
214 views

Picking element from continnuous segment of list according to criteria

From list like: {1, 2, 3, 4, 5, 6, 20, 21, 22, 23, 24, 25, 26, 27, 28, 100, 101, 102, 103, 104} I need to pick position of number that is greatest in continuous ...
1
vote
1answer
472 views

Step plot with log-log scale

Anyone know how to impose a log scale on both the $x$ and $y$ axes after using ListStepPlot? There's nothing special about the data set I've used, just a list of ...
3
votes
3answers
441 views

Mathematica equivalent to gnuplot's fsteps option?

In a ListLinePlot I can set InterpolationOrder -> 0 to get the equivalent of gnuplot's ...
0
votes
1answer
99 views

How can I change the behaviour of InterpolationOrder -> 0? [duplicate]

Consider the following example: ...
2
votes
4answers
1k views

How to make multiple if statements?

I know Mathematica's if format is If[test, then result, else alternative] For example, this ...

15 30 50 per page