cellfun
http://www.mathworks.com/matlabcentral/answers/162312-applying-formula-across-various-matrices
http://stackoverflow.com/questions/20480190/how-to-divide-each-row-of-a-cell-array-by-another-cell-array
http://www.mathworks.com/matlabcentral/answers/162312-applying-formula-across-various-matrices
mat2cell
http://www.mathworks.com/help/matlab/ref/mat2cell.html
找特定一行向量
http://www.mathworks.com/matlabcentral/answers/7434-find-vector-in-matrix
arrayfun
http://stackoverflow.com/questions/12522888/arrayfun-can-be-significantly-slower-than-an-explicit-loop-in-matlab-why
bsxfun
http://stackoverflow.com/questions/16214891/how-to-avoid-a-for-loop-in-matlab-when-performing-a-operation-on-each-row-in-a?lq=1
Apply element-by-element binary operation to two arrayswith singleton expansion enabled
C = bsxfun(fun,A,B)
A = magic(5);
A = bsxfun(@minus, A, mean(A))
A =
4 11 -12 -5 2
10 -8 -6 1 3
-9 -7 0 7 9
-3 -1 6 8 -10
-2 5 12 -11 -4
groupList3 = full(groupList1(ind,:));
groupList3unique = unique(groupList3,'rows');
indexTarget = find(result(:,1) == bestWeightNodes & result(:,2) == bestWeightUsers);
bestNodes = bsxfun(@and ,groupList3, groupList3unique(indexTarget,:));
%groupList3unique
http://www.mathworks.com/matlabcentral/answers/77713-would-a-bsxfun-operator-family-be-a-good-idea
沒有留言:
張貼留言