Post Reply 
Piecewise function question.
08-28-2024, 09:46 PM
Post: #1
Piecewise function question.
Hello everyone, I recently came across a problem while trying to plot some graphs related to a beam.
I've been able to plot piecewise functions in the hp prime so far for shear force, etc., but recently I needed to do something different. Suppose the piecewise function said 5≤X≤7, but I need it to calculate as if it were "2≤X≤0" (going the other way [from right to left] as if the 7 were equal to 0 [the starting point] and 5 were equal to 2). Is there a way I can force it to plot those values while having the graph in the 5 and 7 "positions"?
Find all posts by this user
Quote this message in a reply
08-30-2024, 02:14 AM
Post: #2
RE: Piecewise function question.
I'm not sure if I am understanding your question correctly, but from what I think you are asking, if F1(X) is your original piecewise function, you could simply make F2(X)=F1(7-X) and then graph just F2.
Find all posts by this user
Quote this message in a reply
08-31-2024, 12:57 PM
Post: #3
RE: Piecewise function question.
That worked wonderfully. In addition, instead of needing to write two functions (the main one and (F1(7-x))), substituting (x) for (7-x) in the main function also worked very well. Thank you so much! That was extremely helpful.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 4 Guest(s)