数学建模社区-数学中国
标题:
matlab的一些输出格式
[打印本页]
作者:
tingxuem
时间:
2011-7-26 22:43
标题:
matlab的一些输出格式
format:设置输出格式
# g' f) D& q$ V3 C+ I3 H8 A$ H9 q
对浮点性变量,缺省为format short.
* T5 o8 y3 |' c* E
format并不影响matlab如何计算和存储变量的值。对浮点型变量的计算,即单精度或双精度,按合适的浮点精度进行,而不论变量是如何显示的。对整型变量采用整型数据。整型变量总是根据不同的类(class)以合适的数据位显示,例如,3位数字显示显示int8范围 -128:127。format short, long不影响整型变量的显示。
9 o( R; n! ^- F% e) h
format long 显示15位双精度,7为单精度(scaled fixed point)
" _- u4 z* R. c& K F: y
format short 显示5位(scaled fixed point format with 5 digits)
* g& q' A" e3 X5 n
format short eng 至少5位加3位指数
& x- G2 n i9 n
format long eng 16位加至少3位指数
! h j0 ~$ ~0 \7 r" D$ j! p
format hex 十六进制
, B: X+ d/ [% o
format bank 2个十进制位
* D- |4 N: u; P$ a, d6 O0 _; n
format + 正、负或零
. @/ H( p- B- K: b. Q" L8 H7 r
format rat 有理数近似
: i" q- _1 L* S4 ?. ~( r! S. `
format short 缺省显示
6 ] n, v- U: @) G. y% z
format long g 对双精度,显示15位定点或浮点格式,对单精度,显示7位定点或浮点格式。
' V/ u. Y5 C$ k8 p7 C8 x
format short g 5位定点或浮点格式
1 I8 d P- O7 ^1 Q8 U. X0 l
format short e 5位浮点格式
: C) f* m% @: A" \
format long e 双精度为15位浮点格式,单精度为7为浮点格式
作者:
李金鹏
时间:
2011-7-27 09:14
谢谢
作者:
师长
时间:
2011-7-27 17:58
太吃惊啦
7 r* R& q W9 C! _2 H
作者:
luoye_
时间:
2011-7-27 19:18
好好!!!!!!!!
作者:
luoye_
时间:
2011-7-27 19:18
/////
作者:
luoye_
时间:
2011-7-27 19:19
顶一下!!!!!!!!!
作者:
ljyxn
时间:
2011-8-1 19:36
好东西,顶一个!!谢谢
作者:
双茶香
时间:
2011-11-29 14:38
哈哈 学习了 不是视频 谢谢分享
作者:
851354452
时间:
2011-11-29 22:20
谢谢谢谢谢谢
作者:
851354452
时间:
2011-11-29 22:21
谢谢谢谢谢谢
作者:
851354452
时间:
2011-11-29 22:22
谢谢谢谢谢谢
欢迎光临 数学建模社区-数学中国 (http://www.madio.net/)
Powered by Discuz! X2.5