Re: Re: Displaying results in a column
- To: mathgroup at smc.vnet.net
- Subject: [mg104986] Re: [mg104958] Re: Displaying results in a column
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Sun, 15 Nov 2009 20:49:33 -0500 (EST)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <hdgr97$jeq$1@smc.vnet.net> <hdlk5v$he1$1@smc.vnet.net> <200911151054.FAA09161@smc.vnet.net>
- Reply-to: murray at math.umass.edu
Multiplying pretty much ANYTHING by ANYTHING is syntactically OK -- even
if semantically meaningless. This generality is one of the things that
makes Mathematica such a powerful, yet unified system rather than jus a
collection of disparate functionalities.
Try, for example, the following product of three objects:
Plot3D[Sin[x Sin[y]],{x,0,Pi},{y,0,Pi}] Grid[CityData["Amherst"]]
Manipulate[Expand[(1+c)^n],{n,2,5}]
AES wrote:
> In article <hdlk5v$he1$1 at smc.vnet.net>,
> David Bailey <dave at removedbailey.co.uk> wrote:
>
>>> {expr1, "\n"expr2, "\n"expr3, "\n"expr4, . . . }
>>>
>>> seems to work just fine (in putting sequential expressions on sequential lines)
>>>
>
>> Note that as written, you are actually multiplying the subsequent
>> expressions by the string "\n"! If one of your expressions happens to
>> evaluate to 1, you will get a surprise! You should use Column, as others
>> have already pointed out.
>
> Haven't tried your surprise yet -- but I was surprised to find that
>
> "\n"expr1a + expr1b and "\n"(expr1a+expr1b)
>
> functioned differently -- and now I understand why.
>
> Is multiplying a general expression by a string ("\n") actually legal
> syntax? (and if not, should my using it have triggered an error
> message?)
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
- References:
- Re: Displaying results in a column
- From: AES <siegman@stanford.edu>
- Re: Displaying results in a column