help using bsxfun to multiplay different size matrixes
I want to make the following:
create a matrix that has one more diamention the the matrix norm_mode (actuatty is to make a norm_mode a time function)
to accelrate it on matlab I tryied the use of bsxfun, but I get the error : "Non-singleton dimensions of the two input arrays must match each other."
Please help me fix it, I cant tell where the problem is.
tmp = zeros(newSize, newSize, length(others.t));
for idx_t = 1:length(t)
tmp(:,:,idx_t) = norm_mode(:,:) .* fields(idx_t,3) ;
end
tmp = bsxfun(@times, norm_mode, fields(:, ii));I want to make the following:
create a matrix that has one more diamention the the matrix norm_mode (actuatty is to make a norm_mode a time function)
to accelrate it on matlab I tryied the use of bsxfun, but I get the error : "Non-singleton dimensions of the two input arrays must match each other."
Please help me fix it, I cant tell where the problem is.
tmp = zeros(newSize, newSize, length(others.t));
for idx_t = 1:length(t)
tmp(:,:,idx_t) = norm_mode(:,:) .* fields(idx_t,3) ;
end
tmp = bsxfun(@times, norm_mode, fields(:, ii)); I want to make the following:
create a matrix that has one more diamention the the matrix norm_mode (actuatty is to make a norm_mode a time function)
to accelrate it on matlab I tryied the use of bsxfun, but I get the error : "Non-singleton dimensions of the two input arrays must match each other."
Please help me fix it, I cant tell where the problem is.
tmp = zeros(newSize, newSize, length(others.t));
for idx_t = 1:length(t)
tmp(:,:,idx_t) = norm_mode(:,:) .* fields(idx_t,3) ;
end
tmp = bsxfun(@times, norm_mode, fields(:, ii)); bsxfun, matlab MATLAB Answers — New Questions