Mathematica Asked on March 30, 2021
I have defined the following function:
randvec[mag_]:= mag Normalize[Table[RandomReal[], {j, 1, 4}]]
I would like to format the numbers in the list so that they are 4 d.p. Trying the following:
randvec[mag_] := NumberForm[mag Normalize[Table[RandomReal[], {j, 1, modes}]], 4]
casts each entry as a string. What is the appropriate way to format the list without changing the type of the entries?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP