... 測試時建議將N pt 改為1e4). (a) 保留迴圈(for loop) 加速計算. (b) 將程式以向量化計算加速 clear all. N pt=1e5; x=1:N pt; for ii=1:N pt y(ii)=x(ii)ˆ2;.
確定! 回上一頁