matlab 下标类型
double
int
uint
time: double = int < uint8
较为神奇。
1 clear 2 clc 3 4 time=clock; 5 6 a=zeros(1,100000000); 7 for i=1:100000000 8 a(i)=1; 9 end 10 11 fprintf('time=%f',etime(clock,time));
1s 1s 1.5s
double
int
uint
time: double = int < uint8
较为神奇。
1 clear 2 clc 3 4 time=clock; 5 6 a=zeros(1,100000000); 7 for i=1:100000000 8 a(i)=1; 9 end 10 11 fprintf('time=%f',etime(clock,time));
1s 1s 1.5s