You probably didn't type the unit correctly. See here: http://reference.wolfram.com/language/ref/Quantity.html
– SzabolcsMar 08 '20 at 10:13
I had seen that, but m was also mentioned here: https://reference.wolfram.com/language/ref/QuantityMagnitude.html , but it did not work for me. I got it now working typing "earth gravity" in free-from and then QuantityMagnitude[%].
– pigeonMar 08 '20 at 10:20
Did you type the unit as described in the reference page I linked? Or did you literally type 3.4 m?
– SzabolcsMar 08 '20 at 10:25
You linked to Quantity but we are talking about QuantityMagnitude (which I had linked to in my later comment). this are different.
– pigeonMar 08 '20 at 11:23
You did not answer my question. I linked to the reference page describing how to enter units.
– SzabolcsMar 08 '20 at 13:30
All evidence so far indicates that you simply typed the unit incorrectly (neither with Ctrl-= nor with an explicit Quantity and a valid unit name). Voting to close as simple mistake. If my assumption is incorrect, please describe the problem in more detail, and indicate how you entered the unit precisely.
– SzabolcsMar 08 '20 at 13:31
3
The input to QuantityMagnitude must be a Quantity. Copy and paste the example from the documentation, then convert it to InputForm you will see
Thanks @BobHanlon , But this is very ambiguous from the documentation, unless this followed a rule of which I am not aware. It seams this is a way to implicitly include something and just link to it. Thanks.
– pigeonMar 08 '20 at 20:09
3.4 m? – Szabolcs Mar 08 '20 at 10:25Quantitybut we are talking aboutQuantityMagnitude(which I had linked to in my later comment). this are different. – pigeon Mar 08 '20 at 11:23Quantityand a valid unit name). Voting to close as simple mistake. If my assumption is incorrect, please describe the problem in more detail, and indicate how you entered the unit precisely. – Szabolcs Mar 08 '20 at 13:31QuantityMagnitudemust be aQuantity. Copy and paste the example from the documentation, then convert it toInputFormyou will see
– Bob Hanlon Mar 08 '20 at 14:58QuantityMagnitude[Quantity[3.4, "Meters"]]