Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #6665

Piecewise bug in Mathematica 8.01?

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!indigo.octanews.net!news-out.octanews.net!mauve.octanews.net!nx01.iad01.newshosting.com!newshosting.com!newspump.sol.net!posts.news.twtelecom.net!nnrp2.twtelecom.net!not-for-mail
From Dario <dariopassos@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Piecewise bug in Mathematica 8.01?
Date Wed, 23 Nov 2011 12:17:45 +0000 (UTC)
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Sender steve@smc.vnet.net
Approved Steven M. Christensen <steve@smc.vnet.net>, Moderator
Message-ID <jaio99$eqd$1@smc.vnet.net> (permalink)
Lines 38
NNTP-Posting-Date 23 Nov 2011 11:22:03 GMT
NNTP-Posting-Host 01607035.news.twtelecom.net
X-Trace DXC=A_MYk@>[<4kM`bkG\nAf6kC_A=>8kQj6mm^eQlV`f18g?PbVc[N<l8cEFiONJ7[Gof9?]H?Ti:42o
X-Complaints-To abuse@twtelecom.net
Xref x330-a1.tempe.blueboxinc.net comp.soft-sys.math.mathematica:6665

Show key headers only | View raw


Hello everyone

I'm currently simulating some turbulent processes that incorporate a
large number of random steps.
I used Mathematica's 8.01 Piecewise to produce a function that has
different (random) values at different times. This function is then
used to calculate some differential equations.
Through some debugging I figured out that there is something wrong
with Mathematica's Piecewise when a large number of intervals is used.
Here is the isolated piece of code that I use to generate the random
values function.

******************************************************************
list3 = {};
list4 = {};
j = 0;
Maxt = 40000;
dt = 1;
list3 = Table[RandomReal[{0.01, 0.03}], {i, 0, Maxt, dt}];
list4 = Table[j < t <= j + dt, {j, 0, Maxt, dt}];
anoise = Thread[{list3, list4}];
a = Piecewise[anoise];
Plot[a, {t, 0, Maxt}]
*****************************************************************

The problem I detected has to do with the number of intervals that
Piecewise uses, in this specific case is defined by Maxt.
If Maxt is bigger then 45000 then Mathematica crashes and all values
in memory are lost.
I've tried this in different PCs with different OS (Windows 7 and
Linux) and the same thing happens.
I've also tried to play around with $MaxPiecewiseCases but still no
luck.
Does someone has any idea what might be causing this?

Best Regards
D=E1rio Passos

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Piecewise bug in Mathematica 8.01? Dario <dariopassos@gmail.com> - 2011-11-23 12:17 +0000
  Re: Piecewise bug in Mathematica 8.01? David Bailey <dave@removedbailey.co.uk> - 2011-11-24 12:03 +0000

csiph-web