Maple MAPLE: Superimpose graphs of 10 discontinuous functions

AI Thread Summary
The discussion revolves around the challenge of superimposing graphs of ten different discontinuous functions using MAPLE, particularly for someone with no prior programming experience. The user outlines two specific functions, detailing their definitions across various intervals of time. They seek guidance on how to plot these functions on the same graph, including adding a legend to label each function by date.Key issues raised include difficulties with the legend, specifically an unwanted label "Points 1," and the need to customize the colors of the curves for each function to ensure they are distinguishable. Additionally, the user encounters a limitation in MAPLE, where it appears to only allow the overlay of six functions at a time, prompting a request for solutions to plot all ten functions simultaneously. The discussion emphasizes the need for step-by-step instructions tailored for beginners in MAPLE.
kingwinner
Messages
1,266
Reaction score
0
Hi,

I'm working on an assignment which requires me to superimpose the graphs of 10 different discontinuous functions on the same graph. Can someone please explain step-by-step how to do so in MAPLE? By the way, I have absolutely no experience in any computer programming in any form and I've never used Maple before...sigh.

The horizontal axis is time (t) and the vertical axis is foward rate (f(t)).
Function 1: (Jan 20 data)
For 0<t<1, f(t)=t+2
For t=1, f(t)=4
For 1<t<2, f(t)=2t+3
For t=2, f(t)=9
For 2<t<3, f(t)=2t+7

Function 2: (Jan 21 data)
For 0<t<1, g(t)=t+3
For t=1, g(t)=5
For 1<t<2, g(t)=2t+4
For t=2, g(t)=10
For 2<t<3, g(t)=3t+6

etc...I have similar functions, 10 in total, and I need to superimpose all of them on the same graph.

Furthermore, how can I add a legend clearing labelling each graph as "Jan 20" for graph of function 1, "Jan 21 "for graph of function 2,..., and "Jan29" for graph of function 10?

Any help would be very much appreciated! :)
 
Physics news on Phys.org
So I did some search on the internet and tried to modify some MAPLE code and I got something like the following.

mathfin2.JPG


And now I have some troubles...

1) In the legend part, I don't know why but there is a label "Points 1". How can I remove it from the legend?

2) How can I change the "color" of the curves for each day? (e.g. I want blue for Jan 17, purple for Jan 18, etc., and I need 10 clearly distinguishable colors in total.)

Please help! Anyone?
 
So I typed in 7 of the piecewise functions, but Maple refuses to overlap/superimpose more than 6 functions on the same graph, how can I fix this problem? Is it possible to overlap more than 6 functions on the same graph in MAPLE? Does anyone know?

Help, please!
 
Last edited:

Similar threads

Replies
1
Views
2K
Replies
7
Views
2K
Replies
8
Views
3K
Replies
2
Views
2K
Replies
2
Views
2K
Replies
4
Views
2K
Replies
2
Views
6K
Back
Top