Reputation: 2088
My goal is to change an order three matrix, to an order two matrix simply (perhaps with one line of code) Any idea?
A = rand(256, 256, 3);
B = zeros(256, 256);
for i = 1: size(A, 1)
for j = 1 : size(A, 2)
B(i,j) = max(A(i,j, :));
end
end
Upvotes: 4
Views: 65