Vector Piecewise in 5.1
- To: mathgroup at smc.vnet.net
- Subject: [mg52996] Vector Piecewise in 5.1
- From: "Mark Fisher" <mark at markfisher.net>
- Date: Sun, 19 Dec 2004 06:14:40 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
To my surprise (and delight) it turns out that Piecewise in 5.1 can handle vectors (to some extent): pw1 = Piecewise[{{x, x > 0}}] pw2 = Piecewise[{{x2, x > 0}}] pw = PiecewiseExpand[{pw1, pw2}] This can even be compiled successfully: cf = Compile[{x}, Evaluate[pw]] And differentiated: D[pw, x] But not, however, integrated: Integrate[pw, x] (Worse, Integrate[pw, {x, 0, 3}] returns a scalar.) Is this a bug or just the absence of an undocumented feature? --Mark
- Follow-Ups:
- Re: Vector Piecewise in 5.1
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Vector Piecewise in 5.1