       Re: What's the matter with this?

• To: mathgroup at smc.vnet.net
• Subject: [mg56153] Re: What's the matter with this?
• Date: Sat, 16 Apr 2005 03:53:54 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```On 4/15/05 at 4:48 AM, stevebg at adelphia.net (Steve Gray) wrote:

>I have a list

>intertemp[] = {{14, 17, {0.7929, 0.4366}, {2.8146, 11.3986}}

The curly braces above are not balanced. Did you mean

{14, 17, {0.7929, 0.4366}, {2.8146, 11.3986}}

?

>and a simple function

>modxx[axx_] := axx[] = Mod[axx[], 14, 1];

>When I do modxx[intertemp[]] I get this:

>Set::setps: {14, 17, {0.792902, <<19>>}, {2.81469, 11.3986}} in
>assignment of part is not a symbol.

>What does this mean and how can I do it correctly? I must be making
>a very simple error. I want the 17 to become 3 with no other
>changes.

Assuming there is an extrac "{" in what you posted the following does what you want:

In:=
x = {14, 17, {0.7929, 0.4366}, {2.8146, 11.3986}};

In:=
modxx[axx_] := ReplacePart[axx, Mod[axx[], 14, 1], 2]

In:=
x = modxx[x]

Out=
{14, 3, {0.7929, 0.4366}, {2.8146, 11.3986}}
--
To reply via email subtract one hundred and four

```

• Prev by Date: Re: What's the matter with this?
• Next by Date: Re: Maping and Complex Addition
• Previous by thread: Re: What's the matter with this?
• Next by thread: Re: What's the matter with this?