Piecewise functions in Maxima or GNUplot

Click For Summary
Maxima is a powerful tool for graphing, but users may struggle with drawing piecewise functions due to a lack of prior experience with CAS software. The user prefers using GNUplot for graphing and seeks a method to limit the domains of functions rather than graphing them separately. The help files do not provide clear guidance on implementing piecewise functions. A suggested solution involves using an "if" structure to define the piecewise function. Understanding how to apply this in GNUplot can enhance the user's graphing capabilities.
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:

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 17 ·
Replies
17
Views
46K