Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Formatting table output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66714] Re: Formatting table output
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Sat, 27 May 2006 21:03:14 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <e5924i$399$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

masha wrote:
> Hello,
> 
> I am doing sensitivity analysis of a function called expprofit with
> repsect to \[Sigma]q and I would like to get output in a nice table
> format. I get a table format using the code below, but in the last
> three columns, the output is of the form "a -> 0.2". I would like it to
> be just 0.2
> Is there a way to get rid of the variable name and the arrow?

Hi Masha,

These are replacement rules indeed. Say you have the list {{beta -> 
1.5}, {a -> 0.2}, {b -> 0.27}} returned by the function FindMaximum. 
Then, you can assign the values of beta, a, and b by using the 
transformation operator /. (slash dot) as follows
{beta, a, b} /. Flatten[{{beta -> 1.5}, {a -> 0.2}, {b -> 0.27}}]

> TableForm[Table[Join[{sq}, Flatten[FindMaximum[expprofit , {ß, 0.5,
> 0,
>          4}, {a, 1}, {b, 1}]]], {sq, 0.1, 0.3, 0.05}],
>           TableHeadings -> {{}, {"sq", "Expected Profit", "Beta", "a",
> "b"}}]
> 
> Thank you very much,
> Masha
> 

Best regards,
Jean-Marc


  • Prev by Date: Re: Newbie: Rotataion2D use problem
  • Next by Date: New Analytical Functions - Mathematica Verified
  • Previous by thread: Re: Formatting table output
  • Next by thread: Adding a notebook (or folder) to the Mathematica Front End menus?