Quantcast
Viewing all articles
Browse latest Browse all 2703

How to find max value in each row of matrix w/o max function?

If I have:
A = [1 2 3 4; 2 3 4 5; 4 8 9 10];
[N M] = size(A);
c = zeros(N,1);
for n=1:N;
    for m=1:M;
        c(n) = ?;
    end
end

what do I replace ? with that will find the maximum value in each row of A without using the max function?

Viewing all articles
Browse latest Browse all 2703

Trending Articles