|
[Date Index]
[Thread Index]
[Author Index]
MathCode and FoldList
Hi,
I want to translate some code (which mathgroup helped me to construct) into
C++ using MathCode. It does not understand all the functions in Mathematica,
for instance, it does not take FoldList. Below there is an example of what
I have to do?
FoldList[
#1 + Integrate[
x,
{x, #2[[1]], #2[[2]]}] &,
NIntegrate[
x,
{x, 0, 0.2}], {{a, b}, {c, d}, {e, f}}]
Can you help me getting the same output but avoiding FoldList?
Thanks in advance,
Ruht
----- Original Message -----
From: <cmduncan at mines.edu>
To: mathgroup at smc.vnet.net
Subject: [mg60835] [mg60804] Re: [mg60779] Bug in Mathematica ?
>I got the same answer plugging and chugging by copying and pasting your
>email
> into Mathematica (v5.1):
>
> In[1]:=
> Integrate[Max[x,y],{x,0,1},{y,0,1}]
> NIntegrate[Max[x,y],{x,0,1},{y,0,1}]
>
> Out[1]=
> !(2/3)
>
> Out[2]=
> 0.666667
>
> Chris Duncan
>
> Quoting Bidule <toto at truc.com>:
>
>> Hi,
>>
>> I've computed the following two expressions:
>>
>> Integrate[Max[x, y], {x, 0, 1}, {y, 0, 1}]
>> NIntegrate[Max[x, y], {x, 0, 1}, {y, 0, 1}]
>>
>> which result in very different numbers. When I calculate the integral by
>> hand I get (2/3).
>>
>> Any thoughts ? I guess by now it's probably a known bug. (or maybe even
>> a 'feature').
>>
>> B.
>>
>>
>
>
>
Prev by Date:
Re: Re: Sorting Strings: How and Why so f$&!ing hard?
Next by Date:
Re: Re: question about HoldForm
Previous by thread:
Re: Bug in Mathematica ?
Next by thread:
Re: Bug in Mathematica ?
|