数学建模社区-数学中国

标题: matlab的一些输出格式 [打印本页]

作者: tingxuem    时间: 2011-7-26 22:43
标题: matlab的一些输出格式
format:设置输出格式
$ ?/ `* @; k$ v( c对浮点性变量,缺省为format short.
; [( |. ^  ]* ^; g, i  C! Qformat并不影响matlab如何计算和存储变量的值。对浮点型变量的计算,即单精度或双精度,按合适的浮点精度进行,而不论变量是如何显示的。对整型变量采用整型数据。整型变量总是根据不同的类(class)以合适的数据位显示,例如,3位数字显示显示int8范围 -128:127。format short, long不影响整型变量的显示。
. c/ B' K) s" l) ]* n! L' kformat long 显示15位双精度,7为单精度(scaled fixed point)
: M, K0 o' y& j3 Y, cformat short 显示5位(scaled fixed point format with 5 digits)* Y0 Z- F" G/ [$ e3 M
format short eng   至少5位加3位指数
8 b+ r- \" t. A/ Z, A5 z; W. R) qformat long eng  16位加至少3位指数
. n7 ?4 _* f4 [format hex   十六进制
, G. \; k' I# ~% f: U1 B: s1 Cformat bank  2个十进制位, _, u2 r- a7 \4 S
format +     正、负或零  D1 M) B: D- @8 V( W) b
format rat   有理数近似( o' Y  c( n5 a2 H
format short 缺省显示7 e' \$ \$ S) ~
format long g  对双精度,显示15位定点或浮点格式,对单精度,显示7位定点或浮点格式。
* Z% [4 s% D9 q- Pformat short g  5位定点或浮点格式2 e( d4 B( F$ x+ I5 X& K7 @- F
format short e  5位浮点格式
0 B- a4 H' D  e. Sformat long e  双精度为15位浮点格式,单精度为7为浮点格式
作者: 李金鹏    时间: 2011-7-27 09:14
谢谢
作者: 师长    时间: 2011-7-27 17:58
太吃惊啦# p% O0 S$ h- r" k4 i  z0 r; D. o

作者: 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