Tuesday, 6 August 2013

Useful MATLAB formats for data display

>> angle  = [pi/4 (180/pi)*(pi/4)]
angle =  0.7854   45.0000

>> format short
>> angle
angle =  0.7854   45.0000

>> format short e
>> angle
angle = 7.8540e-001  4.5000e+001

>> format short g
>> angle
angle = 0.7854           45

>> format long
>> angle
angle = 0.78539816339745  45.00000000000000

>> format long e
>> angle
angle = 7.853981633974483e-001    4.500000000000000e+001

>> format long g
>> angle
angle = 0.785398163397448                        45

>> format bank
>> angle
angle =  0.79         45.00

>> format rat
>> angle
angle = 355/452         45      

>> format hex
>> angle
angle = 3fe921fb54442d18   4046800000000000

>> format compact
>> angle

angle =     0.7854   45.0000

No comments:

Post a Comment