0
嗨,我苦苦與matlab vactorization任何幫助,這將是非常感謝。MATLAB矢量化嵌套for循環
oldLocation
,Limit_
是兩個矩陣
for i=1:250
for j=1:350
temp= oldLocation(i,j,:)./Limit_(i,j,:);
end
end
嗨,我苦苦與matlab vactorization任何幫助,這將是非常感謝。MATLAB矢量化嵌套for循環
oldLocation
,Limit_
是兩個矩陣
for i=1:250
for j=1:350
temp= oldLocation(i,j,:)./Limit_(i,j,:);
end
end
只需直接執行除法。當然,您需要修改後面的代碼(除非您保留覆蓋temp
)
temp = oldLocation./Limit_;