Storing matrix value

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

 采纳的回答

更多回答(1 个)

A = [ 6 2 3
7 9 0
8 3 4];
[minval,I] = min(A(1,:));
z = A(2:end,I);

类别

帮助中心File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by