필터 지우기
필터 지우기

Storing matrix value

조회 수: 1 (최근 30일)
FIR
FIR 2012년 5월 23일
I have a matrix A =
6 2 3
7 9 0
8 3 4
i have found the minimum value from 1st row,
M=min(A(1,:))
i get value as M=2,now i want to store other values in that column which is 9 and 3 in a variable Z,
so i will have
Z=
9
3
please help

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 5월 23일
[id,id]=min(A(1,:))
Z = A(2:end,id)

추가 답변 (1개)

Wayne King
Wayne King 2012년 5월 23일
A = [ 6 2 3
7 9 0
8 3 4];
[minval,I] = min(A(1,:));
z = A(2:end,I);
  댓글 수: 1
FIR
FIR 2012년 5월 23일
Thanks wayne

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by