MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Recognize multiple outputs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118054] Re: Recognize multiple outputs
  • From: Helen Read <readhpr at gmail.com>
  • Date: Sat, 9 Apr 2011 18:01:10 -0400 (EDT)
  • References: <inpesa$8t8$1@smc.vnet.net>

On 4/9/2011 7:11 AM, mailcwc at gmail.com wrote:
> Is it possible to show the name of the variables in the output cell?
> For example, currently I have
> [In1] a=10^2
> [Out1] 100
>
> I want it to be
> [Out1] a=100
>
> The reason for this is when we have multiple lines of calculation in
> an input cell,
> sometimes it is hard to recognize which number is which,
> especially when the input cell has several pages and the calculations
> are scattered in the cell.
>
>

Use Row to mix strings with expressions.


a = 10^2;
Print[Row[{"a = ", a}]];
g[x_] := x^3;
Print[Row[{"g(x) = ", g[x]}]];
Print[Row[{"g'(x) = ", g'[x]}]];
Print[Row[{"g'(a) = ", g'[a]}]];

-- 
Helen Read
University of Vermont


  • Prev by Date: Re: Importing text file as machine-precision array
  • Next by Date: Re: Recognize multiple outputs
  • Previous by thread: Recognize multiple outputs
  • Next by thread: Re: Recognize multiple outputs