       Re: A Problem with x[i_]:=

• To: mathgroup at smc.vnet.net
• Subject: [mg82988] Re: [mg82969] A Problem with x[i_]:=
• From: DrMajorBob <drmajorbob at bigfoot.com>
• Date: Tue, 6 Nov 2007 03:41:51 -0500 (EST)
• References: <19456693.1194259250204.JavaMail.root@m35>

```Clear[x]
x[i_] := Total[-2 Log[(npdpd/v[i])^v[i]]]
list = x /@ Range

{-2 + Log[(npdpd/v)^v], -2 + Log[(npdpd/v)^v], -2 +
Log[(npdpd/v)^v], -2 + Log[(npdpd/v)^v], -2 +
Log[(npdpd/v)^v], -2 + Log[(npdpd/v)^v], -2 +
Log[(npdpd/v)^v], -2 + Log[(npdpd/v)^v], -2 +
Log[(npdpd/v)^v], -2 + Log[(npdpd/v)^v]}

Total does nothing here unless npdpd and/or v[i] is a List.

Bobby

On Mon, 05 Nov 2007 04:03:05 -0600, John <jwa0 at lehigh.edu> 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
>
>
>

--

DrMajorBob at bigfoot.com

```

• Prev by Date: Re: Plot boundaries not respected
• Next by Date: Re: NDSolve with functions of vectors
• Previous by thread: Re: A Problem with x[i_]:=
• Next by thread: Re: A Problem with x[i_]:=