Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #15866
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: About Table |
| Date | 2011-01-28 11:16 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ihu8i6$1or$1@smc.vnet.net> (permalink) |
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@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@austin.rr.com> a Ecrit
> :
>
>
> De: DrMajorBob <btreat1@austin.rr.com>
> Objet: Re: About Table
> =C0: mathgroup@smc.vnet.net, "olfa" <olfa.mraihi@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@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@yahoo.com
>
>
>
>
--
DrMajorBob@yahoo.com
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: About Table DrMajorBob <btreat1@austin.rr.com> - 2011-01-28 11:16 +0000
csiph-web