MATLAB Answers

How to sum the minor number of each line in a matrix?

1 view (last 30 days)
Carolina Silva
Carolina Silva on 20 Nov 2019
Answered: Erivelton Gualter on 20 Nov 2019
The question its in the title, thanks

  0 Comments

Sign in to comment.

Answers (1)

Erivelton Gualter
Erivelton Gualter on 20 Nov 2019
Given matrix A as:
A = [9 6 3;
8 5 2;
7 4 1]; % Sample Matrix
minA = min(A,[],2); % Returns min value for each line (row)
sumMinA = sum(minA); % Returns the sum of the min values

  0 Comments

Sign in to comment.

Sign in to answer this question.

Tags