MathGroup Archive 2006

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

Search the Archive

Re: Formatting table output


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
==========================================================


  • Prev by Date: Re: Newbie: Rotataion2D use problem
  • Next by Date: Re: Re: scalar field visualization
  • Previous by thread: Formatting table output
  • Next by thread: Re: Formatting table output