finding the mean/average of the smallest values in a row

조회 수: 2 (최근 30일)
Ach
Ach 2018년 2월 25일
답변: Bhuvnesh Singh 2018년 2월 28일
hi i have a row and i want to find the average of the smallest values (minimums) and the position of this element

채택된 답변

Bhuvnesh Singh
Bhuvnesh Singh 2018년 2월 28일
To achieve this you can use function min and function mean
Lets say
A = [1.7 1.2 1.5; 1.3 1.6 1.99]
% use min function to get smallest element from each row.
M = min(A,[],2)
% use mean function
result = mean(M)
Follow the below links for more information:

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by