RE: piecewise plot
- To: mathgroup at smc.vnet.net
- Subject: [mg78907] RE: [mg78854] piecewise plot
- From: Robert Pigeon <robert.pigeon at videotron.ca>
- Date: Thu, 12 Jul 2007 05:24:13 -0400 (EDT)
- References: <200707111011.GAA05761@smc.vnet.net>
About this for a start.... c[t_] := \[Piecewise] { {0, t >= 0 && t < 10}, {1, t >= 10 && t < 20}, {0, t >= 20 && t < 30}, {-0.5, t >= 30 && t < 40}, {0, t >= 40 && t < 50}, {2, t >= 50 && t < 60} } Plot[c[t],{t,0,60},Filling->Axes,FillingStyle->Orange] Robert -----Original Message----- From: Jake Trexel [mailto:jtrexel at ix.netcom.com] Sent: July-11-07 06:11 To: mathgroup at smc.vnet.net Subject: [mg78907] [mg78854] piecewise plot I would like to plot something like this with version 6 At time 0 to 10 the current is 0, at time 10 to 20 it is 1, time 20 to 30 it is 0, time 30 to 40 it is -0.5, time 40 to 50 it is 0, then at time 50 to 60 it is +2. I would like to break each of these up into something like this eq1:= for 0 to 10, eq2 := 10 to 20 and so on. Then I want to combine the equations into a plot. Then I would like to fill in the different sections with different colors. I will then go one with another eq. that uses these results and filled in areas to show how they interact. I will worry about this after my first question. Can some one help me? thanks Prof. Jake Former Professor of Mechanical Engineering
- Follow-Ups:
- Re: RE: piecewise plot
- From: Brett Champion <brettc@wolfram.com>
- Re: RE: piecewise plot
- References:
- piecewise plot
- From: "Jake Trexel" <jtrexel@ix.netcom.com>
- piecewise plot