很容易呀!用tic,toc把程序围起来就可以了
例子:
>>tic;A=[1,2;3,4];B=[5,6;7,8]; x=A/B,toc
>>
x =
3.0000 -2.0000
2.0000 -1.0000
elapsed_time =
0.0150
很容易呀!用tic,toc把程序围起来就可以了
例子:
>>tic;A=[1,2;3,4];B=[5,6;7,8]; x=A/B,toc
>>
x =
3.0000 -2.0000
2.0000 -1.0000
elapsed_time =
0.0150