Re: Formatting table output

*To*: mathgroup at smc.vnet.net*Subject*: [mg66737] Re: [mg66685] Formatting table output*From*: gardyloo <gardyloo at mail.wsu.edu>*Date*: Sat, 27 May 2006 21:04:25 -0400 (EDT)*References*: <200605270751.DAA02905@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi, masha, You might try a replacement: Right outside the closing bracket for Flatten, put /.{(a_->x_)->x} so that your expression reads TableForm[Table[Join[{sq}, Flatten[FindMaximum[expprofit, {ß, 0.5, 0, 4}, {a, 1}, {b, 1}]] /. {(a_ -> x_) -> x}], {sq, 0.1, 0.3, 0.05}], TableHeadings -> {{}, {"sq", "Expected Profit", "Beta", "a", "b"}}] Hope that's what you were looking for. Cheers, C.O. 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? > > 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 > > > -- ========================================================== Curtis Osterhoudt PGP Key ID: 0x088E6D7A Please avoid sending me Word or PowerPoint attachments See http://www.gnu.org/philosophy/no-word-attachments.html ==========================================================

**References**:**Formatting table output***From:*"masha" <mshunko@gmail.com>