Guest User

Untitled

a guest
Jan 17th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. for adj = 1:size(loc,1)
  2. testFunc(data1(loc(i,2),loc(i,1)), data2(loc(i,2),loc(i,1)), othervals)
  3. end
  4.  
  5. 1 3 5
  6. 2 4 6
  7.  
  8. linIdx = sub2ind(size(data),loc(:,2),loc(:,1))
  9.  
  10. testFunc(data1(linIdx(i)), data2(linIdx(i)), othervals)
  11.  
  12. ind=sub2ind(size(data1),location(:,1),location(:,2));
  13. output=arrayfun(@(x,y) testFunc(x,y,othervals),data1(ind),data2(ind));
  14.  
  15. output=arrayfun(@(x,y) testFunc(x,y,othervals),data1(ind),data2(ind),'UniformOutput',0);
Add Comment
Please, Sign In to add comment