       Re: A Problem with x[i_]:=

• To: mathgroup at smc.vnet.net
• Subject: [mg82993] Re: A Problem with x[i_]:=
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Tue, 6 Nov 2007 03:44:26 -0500 (EST)
• Organization: Uni Leipzig
• References: <fgmq4o\$9tv\$1@smc.vnet.net>

```Hi,

a) can you make postings that are syntacical correct or mean
x=N[Total[-2Log[((n)(pdpd)/v[I])^v[i]]],10] realy I that is
the complex unit Sqrt[-1]==I
and your second input should be:
x[i_] := N[Total[-2 Log[((n) (pdpd)/v[i])^v[i]]], 10]

b) Table[N[Total[-2 Log[((n) (pdpd)/v[i])^v[i]]], 10],{i,1,10000000}]
will make a list with all you evaluated expressions and
Table[x[i]=N[
Total[-2 Log[((n) (pdpd)/v[i])^v[i]]],10],{i,1,10000000}]
will store it in x[i] *and* in the ouput list ..

Regards
Jens

John wrote:
> The assignment, x=N[Total[-2Log[((n)(pdpd)/v[I])^v[i]]],10], executes
> for i=1,2,..,10, and I can make a list of the 10 outcomes by repeating
> the assignment 10 times.
>
> I thought that the assignment, x[i_]:=N{Total[-2Log[((n)(pdpd)/
> v[i])^v[i]]],10], would make a list of the 10 outcomes, without the
> necessity of manual repetitions, but Mathematica rejected it.
>
> The error message tells me that my assignment won't execute because
> times is protected.
>
> There must be some way to do what I want to do, but I can't figure it
> out.
>
> I am using Mathematica 6.
>
> John
>
>

```

• Prev by Date: Re: Problem with supplying custom tick marks
• Next by Date: Re: Dynamic palette of open notebooks
• Previous by thread: Re: A Problem with x[i_]:=
• Next by thread: Re: A Problem with x[i_]:=