필터 지우기
필터 지우기

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

조회 수: 1 (최근 30일)
Carolina Silva
Carolina Silva 2019년 11월 20일
답변: Erivelton Gualter 2019년 11월 20일
The question its in the title, thanks

답변 (1개)

Erivelton Gualter
Erivelton Gualter 2019년 11월 20일
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

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by