2011-05-05 552 views
0

嗨,我苦苦與matlab vactorization任何幫助,這將是非常感謝。MATLAB矢量化嵌套for循環

oldLocationLimit_是兩個矩陣

for i=1:250 
     for j=1:350 
      temp= oldLocation(i,j,:)./Limit_(i,j,:); 
     end 
    end 

回答

3

只需直接執行除法。當然,您需要修改後面的代碼(除非您保留覆蓋temp

temp = oldLocation./Limit_;