Matlab: Change Number Format to Remove Decimals

  • Context: MATLAB 
  • Thread starter Thread starter Moly
  • Start date Start date
  • Tags Tags
    Format Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 17K views
Moly
Messages
20
Reaction score
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.
 
Physics news on Phys.org
Try typing this in Matlab:

Code:
doc format
 
shoehorn said:
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?