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

Matlab - number format

  1. Sep 26, 2008 #1
    Hi All

    Matlab is displaying numbers with 4 decimal places and i hate when it does that for whole numbers. for example i have a matrix C(i) that starts off from 1 down to 150/275. When i multiply it by 275 i get the first entry as 275.0000 and the last as 150.0000 how do i turn that off or instruct it not to do so.
  2. jcsd
  3. Sep 26, 2008 #2
    Try typing this in Matlab:

    Code (Text):
    doc format
  4. Sep 26, 2008 #3
    Thank you for your reply. i tried the first few before posting my question and could not really figure it out. any advice as to which specific option to use?
  5. Sep 26, 2008 #4


    User Avatar
    Science Advisor
    Gold Member

    Code (Text):
    format short g
    should work
  6. Sep 29, 2008 #5
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?