9-4 ?╅櫍?勫収?ㄨ??欏???

痻皚ず场戈篈常琌箇砞Θ double蛮弘非疊翴计 MATLAB 5.3 ぇや穿ぃ俱计籔疊翴计戈篈俱瞶

弧
uint8 锣传Θぃ盿タ璽腹 8 じ俱计ㄤ办 $[0, 2^{8}-1]=[0,255]$
uint16 锣传Θぃ盿タ璽腹16 じ俱计ㄤ办 $[0, 2^{16}-1]=[0,65535]$
uint32 锣传Θぃ盿タ璽腹32 じ俱计ㄤ办 $[0, 2^{32}-1]$
int8 锣传Θ盿タ璽腹 8 じ俱计ㄤ办 $[-2^{7}, 2^{7}-1]=[-128,127]$
int16 锣传Θ盿タ璽腹  16 じ俱计ㄤ办 $[-2^{15}, 2^{15}-1]=[-32768,32767]$
int32 锣传Θ盿タ璽腹  32 じ俱计ㄤ办 $[-2^{31}, 2^{31}-1]$
single 锣传Θ single虫弘非疊翴计ノ 32 じ4 bytes
double 锣传Θdouble 蛮弘非疊翴计ノ 64 じ8 bytes
char 锣传Θじ┪﹃–じノ16 じ2 bytes

狦и璶竊癘拘砰丁碞ㄌ痻皚じ絛瞅匡ノぃ戈ㄓ纗ㄒ

Example 1: 09-痻皚矪瞶籔笲衡/dataType01.mclear all % 睲埃┮Τ丁跑计 x_double = magic(10); x_single = single(x_double); x32 = uint32(x_double); x16 = uint16(x_double); x8 = uint8(x_double); whos Name Size Bytes Class Attributes x16 10x10 200 uint16 x32 10x10 400 uint32 x8 10x10 100 uint8 x_double 10x10 800 double x_single 10x10 400 single

パㄏノ uint8 ㄓ纗跑计┮丁Τ double だぇ琌璶猔種琌俱计戈篈絛瞅Τ璝禬筁絛瞅玥禬场だ盢穦砆掉奔ㄒ

Example 2: 09-痻皚矪瞶籔笲衡/dataTypeRange01.mfprintf('uint8(300) ='); disp(uint8(300)); % uint8 程 255 fprintf('int8(-500) ='); disp(int8(-500)); % int8 程 -128uint8(300) = 255 int8(-500) = -128


MATLAB祘Α砞璸絞