Matlab - number format

  • MATLAB
  • Thread starter Moly
  • Start date
  • #1
21
0
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.
 

Answers and Replies

  • #2
424
1
Try typing this in Matlab:

Code:
doc format
 
  • #3
21
0
Try typing this in Matlab:

Code:
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?
 
  • #4
f95toli
Science Advisor
Gold Member
3,232
724
Code:
format short g

should work
 
  • #5
21
0
thanks
 

Related Threads on Matlab - number format

Replies
3
Views
1K
Replies
1
Views
7K
Replies
1
Views
26K
Replies
1
Views
3K
Replies
2
Views
793
Replies
1
Views
6K
Replies
1
Views
9K
Replies
1
Views
1K
Replies
1
Views
972
  • Last Post
Replies
2
Views
2K
Top