Re: Weird Print Result
- To: mathgroup at smc.vnet.net
- Subject: [mg74153] Re: Weird Print Result
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Mon, 12 Mar 2007 22:12:58 -0500 (EST)
- Organization: Uni Leipzig
- References: <et36rq$qgu$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, the result of Print[] is Null -- this mean that Print[] return nothing (but all functions in Mathematica must return something) and so it return Null, since X[[1]] is a sum, i.e. Head[X[[1]]]===Plus, you replace every term in the sum by Null and you have Null+Null+Null+Null and this is 4*Null Regards Jens Bruce Colletti wrote: > Re Mathematica 5.2 under WinXP. > > The code below creates the correct output, except for a strange concluding "4 Null." > > What does this weird last line of output mean (list length?), why does it print, and how can it be suppressed? > > Thankx. > > Bruce > > > n = 2; > T = Array[p, {n, n}]; > X0 = Array[x, {n}]; > X = (Expand /@ (X0.MatrixPower[T, 2])); > Print /@ X[[1]] >