Re: About Table
- To: mathgroup at smc.vnet.net
- Subject: [mg115993] Re: About Table
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Fri, 28 Jan 2011 06:16:05 -0500 (EST)
Use SetDelayed:
f[n_Integer,m_,a_] := m + Max[Table[a[index1], {index1, i, n}]]
(or something like that)
You shouldn't use N as a variable, since it is a built-in function.
In general, it's a bad idea to capitalize the first letter of your own
variable names.
Bobby
On Thu, 27 Jan 2011 16:42:06 -0600, olfa mraihi <olfa.mraihi at yahoo.fr>
wrote:
> I agree but :
> 1)how can I maintain Table as a list even if its bounds are not defined?
> 2)if it is not possible how can I replace Table by a function that has
> the same meaning but can works with symbolic bounds?
>
> --- En date de : Jeu 27.1.11, DrMajorBob <btreat1 at austin.rr.com> a Ecrit
> :
>
>
> De: DrMajorBob <btreat1 at austin.rr.com>
> Objet: Re: [mg115951] About Table
> =C0: mathgroup at smc.vnet.net, "olfa" <olfa.mraihi at yahoo.fr>
> Date: Jeudi 27 janvier 2011, 23h12
>
>
> I'd guess that Max saw only one argument (the Table, which is not a list
> at that point, as N is not defined), and the Max of one thing is that
> thing.
>
> Bobby
>
> On Thu, 27 Jan 2011 02:40:21 -0600, olfa <olfa.mraihi at yahoo.fr> wrote:
>
>> Hi Mathematica community,
>>
>> when evaluating this input (with shift+enter):
>> m + Max[Table[A[index1], {index1, i, N}]]
>>
>> I obtain the output:
>> m + Table[A[index1], {index1, i, N}]
>>
>> How to explain why the function Max wasn't maintained (I mean why it
>> was ignored by mathematica)???!!!
>>
>> Thank you very much.
>>
>
>
> --DrMajorBob at yahoo.com
>
>
>
>
--
DrMajorBob at yahoo.com