Reputation: 87
how to remove decimal trailing zeros in matrix (C) in matlab.
65.7500 4.7500 4.7500 64.0000 60.0000
118.9000 105.6000 92.5500 147.6000 178.2000
73.6600 84.0100 95.6900 190.0000 164.0000
147.9000 132.0000 140.0000 147.0000 116.5000
ans=
65.75 4.75 4.75 64 60 118.9 105.6 92.55 147.6 178.2 73.66 84.01 95.69 190 164 147.9 132 140 147 116.5
Upvotes: 0
Views: 9084
Reputation: 124563
>> format short g
>> C
C =
65.75 4.75 4.75 64 60
118.9 105.6 92.55 147.6 178.2
73.66 84.01 95.69 190 164
147.9 132 140 147 116.5
Upvotes: 8