Quantcast Matlab - number format Text - Physics Forums Library

PDA

View Full Version : Matlab - number format


Moly
Sep26-08, 03:44 PM
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.

shoehorn
Sep26-08, 05:27 PM
Try typing this in Matlab:

doc format

Moly
Sep26-08, 05:31 PM
Try typing this in Matlab:

doc format

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?

f95toli
Sep26-08, 06:58 PM
format short g

should work

Moly
Sep29-08, 02:12 PM
thanks