Skip to main content
22 events
when toggle format what by license comment
Jun 13, 2015 at 0:46 history edited Mr.Wizard CC BY-SA 3.0
deleted 2 characters in body
Jun 12, 2015 at 18:40 answer added J. M.'s missing motivation timeline score: 3
May 25, 2015 at 11:46 history edited Mr.Wizard CC BY-SA 3.0
deleted 317 characters in body
May 25, 2015 at 11:39 comment added J. M.'s missing motivation For the case of the accepted answer, I think turning the indefinite integral into a definite one (thus, enforcing a boundary condition) should work; if memory serves, the indefinite integration happens to pick the particular integral that is zero at the left endpoint.
May 25, 2015 at 11:32 comment added Mr.Wizard @J. M. Now that you ask it like that I suppose so. :-) Is there a simple way to adjust that constant in the case of the Accepted answer, inside the interpolating function? I mean not defining f[x_] := ... + 0.1. Just curious.
May 25, 2015 at 11:21 comment added J. M.'s missing motivation "vertically offset slightly" - you know different functions that have the same derivative differ only by an arbitrary constant, yes? :)
May 25, 2015 at 11:07 history edited Mr.Wizard CC BY-SA 3.0
added 1628 characters in body
May 25, 2015 at 2:44 history edited J. M.'s missing motivation
edited tags
Jan 11, 2015 at 9:55 vote accept Mr.Wizard
Jan 10, 2015 at 13:44 answer added Basheer Algohi timeline score: 10
Jan 10, 2015 at 7:33 answer added Mr.Wizard timeline score: 5
Jan 10, 2015 at 7:03 comment added Mr.Wizard @David As stated I was tired when I wrote this question and I know it could have been written better. Please, would you consider editing it yourself with the improvements you suggest? One exception however: the input format is not important, only the result, so for example the slope in the first pair or the entire first pair could be omitted if desired so long as the solution works with that.
Jan 10, 2015 at 0:29 history tweeted twitter.com/#!/StackMma/status/553710164894035968
Jan 9, 2015 at 23:42 comment added David G. Stork The current problem statement refers to "transition points," but in a two-dimensional plot one generally understands a "point" to be specified by a two-dimensional coordinate; instead, the current problem means a single ordinate value. Very awkward.
Jan 9, 2015 at 23:27 comment added David G. Stork I would also not use the phrase "joined slopes" in the title, since a slope is a real-valued number and is never "joined." I'd suggest a title such as this: "Create a piecewise linear function from a list of ordinates and scalar slopes." Or something like that.
Jan 9, 2015 at 23:04 comment added David G. Stork OK. Fair enough. But here's how I would clarify and improve the question: "Given a sequential list of pairs {y_i, slope_i}, create and plot the continuous, piecewise linear function of x that goes from point {x_i, y_i} through {x_(i+1), y_(i+1)} with slope slope_(i+1). (Note that you're effectively solving for the x_i; note too the slope of the first pair in the list is never used.)"
Jan 9, 2015 at 22:47 answer added george2079 timeline score: 6
Jan 9, 2015 at 22:35 answer added DumpsterDoofus timeline score: 23
Jan 9, 2015 at 22:19 comment added DumpsterDoofus @DavidG.Stork: The graph will always be continuous on $(-\infty,m]$ where $m$ is the max bound, irregardless of what data is used. Try using your example with his plot method.
Jan 9, 2015 at 22:17 comment added David G. Stork What would you want for your graph if your data did not form a continuous function, e.g., {{0,0}, {10,1}, {20, 5}, {30, -8}}?
Jan 9, 2015 at 22:14 comment added Mr.Wizard @David Sorry for being vague. I'm tired and can't think clearly. :-p I did not mean slope in the proper sense, just the common one. The function behaves just as I want despite the poor terminology. In the dat format the pairs {v, s} should be read as "use slope s up to value v" -- the {0, 0} what just added to make my kludgy function work.
Jan 9, 2015 at 21:48 history asked Mr.Wizard CC BY-SA 3.0