Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Quick Mathematica Issue

  1. Oct 14, 2011 #1

    I have a nagging issue that keeps annoying me in Mathematica.

    If a Mathematica function outputs a number I want in the form "variable→number", is there a function I could use or something simple I could type to get the number itself, rather than in the Root[variable, number] form?

    Here's an example. I type:


    and Mathematica outputs:

    OneSidedPValue → .0227501

    I'm looking for a function f where, if I type:


    Then Mathematica will output:


    Thanks for any help you can give.

    -HJ Farnsworth
  2. jcsd
  3. Oct 15, 2011 #2
    You need to de-reference it:

    a = NormalPValue[-2]

    myf[t_] := OneSidedPValue /. NormalPValue[t]
  4. Oct 15, 2011 #3
    That worked, thank you.

    -HJ Farnsworth
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook