2
是否可以從以下代碼中刪除所有循環,並使用向量計算k
值。從代碼中刪除循環?
index = 0;
for i = 1.1:0.1:2.5
for j = 200:300:3000
for z = 1:14:14000
index = index + 1;
k(index) = (log(i) *pi/(sqrt(j)))* exp(z);
end
end
end