Piecewise functions in Maxima or GNUplot

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 13K views
GregA
Messages
210
Reaction score
0
I managed to lay my grubby mitts on Maxima about a month ago (fantastic program), but having no prior knowledge of CAS software or programming I am stuggling trying to figure out how to draw piecewise defined functions either through maxima itself or the GNUplot command line window (I prefer the latter for graphing)...I know that I can just graph two functions together and make a mental note of where one stops and the other starts, but what I want to do is just limit their domains, and nowhere in the help files I have can I find even a vague mention of this. can anyone help?
 
Physics news on Phys.org
a function with an if struct will do it.

http://gnuplot.info/docs/gnuplot.html#if
 
Last edited by a moderator: