Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
what's wrong with these expressions?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
dushan  
View profile   Translate to Translated (View Original)
 More options 4 Nov, 07:19
Newsgroups: comp.soft-sys.math.mathematica
From: dushan <dush...@spinn.net>
Date: Wed, 4 Nov 2009 07:19:35 +0000 (UTC)
Local: Wed 4 Nov 2009 07:19
Subject: what's wrong with these expressions?
I defined two 3-D vector functions,
    {Subscript[n,p][z_], Subscript[n,m][z_]} := {{p1[z],p2[z],p3[z]},
                                                      {m1[z],m2[z],m3
[z]}}
where p? and m? are simple functions of z.  When displayed they appear
as expected.  But when I tried to define the dyadics
    {Subscript[nn,p][z_], Subscript[nn,m][z_]} :=
                     {Outer[Times, Subscript[n,p][z], Subscript[n,p]
[z]],
                      Outer[Times, Subscript[n,m][z], Subscript[n,m]
[z]]}
I got the error message that the expression 'is incomplete, more input
is needed'.

When I separate this into two independent commands, as
    Subscript[nn,p][z_] := Outer[Times, Subscript[n,p][z],
                                              Subscript[n,p][z]]
    Subscript[nn,m][z_] := Outer[Times, Subscript[n,m][z],
                                              Subscript[n,m][z]]
no error is generated.  Probably irrelevant, but I noticed that in
both cases the outer brackets of the 'm' definition were slightly
smaller than those of the 'p' definition.

To check the result I asked to display the inner product
    Subscript[nn,p][z].Subscript[n,p][z]
and got the error message 'Recursion depth 256 exceeded'.

In fact, when, to reassure myself, I tried again to display Subscript
[n,p][z], I got the same error message.  So I went back over the
definitions, and this time
    Subscript[nn,p][z].Subscript[n,p][z]
produced the expected answer.

What could possibly be changing that sometimes, but not always,
produces the error messages in these two cases?  I'm at a loss to know
what to watch out for.

- Dushan


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dush...@spinn.net  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:20
Newsgroups: comp.soft-sys.math.mathematica
From: dush...@spinn.net
Date: Thu, 5 Nov 2009 09:20:53 +0000 (UTC)
Local: Thurs 5 Nov 2009 09:20
Subject: Re: what's wrong with these expressions?

Okay, so it worked on your system but not on mine.

Why?  I'm not sure what I'm supposed to have learned from this.

 - Dushan


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dushan  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:21
Newsgroups: comp.soft-sys.math.mathematica
From: dushan <dush...@spinn.net>
Date: Thu, 5 Nov 2009 09:21:20 +0000 (UTC)
Local: Thurs 5 Nov 2009 09:21
Subject: Re: what's wrong with these expressions?
On Nov 4, 12:19 am, dushan <dush...@spinn.net> wrote:

> To check the result I asked to display the inner product
>     Subscript[nn,p][z].Subscript[n,p][z]
> and got the error message 'Recursion depth 256 exceeded'.

>   <SNIP>
> What could possibly be changing that sometimes, but not always,
> produces the error messages in these two cases?  I'm at a loss to know
> what to watch out for.

Oops!

For this last problem I finally found the cause: I had inadvertently used
the same symbol for two different definitions, one of which used the
other definition.  This of course would produce the recursivity that trip-
ped me up.  Strange how my mind could compartmentalize separate defini-
tions without noticing they had the same label!

- Dushan


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DrMajorBob  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:24
Newsgroups: comp.soft-sys.math.mathematica
From: DrMajorBob <btre...@austin.rr.com>
Date: Thu, 5 Nov 2009 09:24:34 +0000 (UTC)
Local: Thurs 5 Nov 2009 09:24
Subject: Re: what's wrong with these expressions?
No problem here:

{Subscript[n, p][z_],
   Subscript[n, m][z_]} := {{p1[z], p2[z], p3[z]}, {m1[z], m2[z],
    m3[z]}}

{Null, Null}

(* testing *)
{Subscript[n, p][z], Subscript[n, m][z]}

{{p1[z], p2[z], p3[z]}, {m1[z], m2[z], m3[z]}}

{Subscript[nn, p][z_],
   Subscript[nn, m][z_]} := {Outer[Times, Subscript[n, p][z],
    Subscript[n, p][z]],
   Outer[Times, Subscript[n, m][z], Subscript[n, m][z]]}

{Null, Null}

(* testing *)
{Subscript[nn, p][z], Subscript[nn, m][z]}

{{{p1[z]^2, p1[z] p2[z], p1[z] p3[z]}, {p1[z] p2[z], p2[z]^2,
    p2[z] p3[z]}, {p1[z] p3[z], p2[z] p3[z], p3[z]^2}}, {{m1[z]^2,
    m1[z] m2[z], m1[z] m3[z]}, {m1[z] m2[z], m2[z]^2,
    m2[z] m3[z]}, {m1[z] m3[z], m2[z] m3[z], m3[z]^2}}}

Bobby

--
DrMajor...@yahoo.com

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Szabolcs Horvát  
View profile   Translate to Translated (View Original)
 More options 5 Nov, 09:26
Newsgroups: comp.soft-sys.math.mathematica
From: Szabolcs Horvát <szhor...@gmail.com>
Date: Thu, 5 Nov 2009 09:26:43 +0000 (UTC)
Local: Thurs 5 Nov 2009 09:26
Subject: Re: what's wrong with these expressions?
On 2009.11.04. 8:19, dushan wrote:

> I defined two 3-D vector functions,
>      {Subscript[n,p][z_], Subscript[n,m][z_]} := {{p1[z],p2[z],p3[z]},
>                                                        {m1[z],m2[z],m3
> [z]}}
> where p? and m? are simple functions of z.  When displayed they appear
> as expected.  But when I tried to define the dyadics
>      {Subscript[nn,p][z_], Subscript[nn,m][z_]} :=
>                       {Outer[Times, Subscript[n,p][z], Subscript[n,p]
> [z]],
>                        Outer[Times, Subscript[n,m][z], Subscript[n,m]
> [z]]}
> I got the error message that the expression 'is incomplete, more input
> is needed'.

That error message usually indicated missing brackets.  However, the
exact expressions that you posted do not produce any error messages.
Did you use exactly these expressions or something slightly different?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DrMajorBob  
View profile   Translate to Translated (View Original)
 More options 6 Nov, 10:20
Newsgroups: comp.soft-sys.math.mathematica
From: DrMajorBob <btre...@austin.rr.com>
Date: Fri, 6 Nov 2009 10:20:24 +0000 (UTC)
Local: Fri 6 Nov 2009 10:20
Subject: Re: what's wrong with these expressions?
You got me. What am I supposed to learn from it?

Bobby

--
DrMajor...@yahoo.com

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google