Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for adj = 1:size(loc,1)
- testFunc(data1(loc(i,2),loc(i,1)), data2(loc(i,2),loc(i,1)), othervals)
- end
- 1 3 5
- 2 4 6
- linIdx = sub2ind(size(data),loc(:,2),loc(:,1))
- testFunc(data1(linIdx(i)), data2(linIdx(i)), othervals)
- ind=sub2ind(size(data1),location(:,1),location(:,2));
- output=arrayfun(@(x,y) testFunc(x,y,othervals),data1(ind),data2(ind));
- output=arrayfun(@(x,y) testFunc(x,y,othervals),data1(ind),data2(ind),'UniformOutput',0);
Add Comment
Please, Sign In to add comment