Storing matrix value

1 vue (au cours des 30 derniers jours)
FIR
FIR le 23 Mai 2012
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

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 23 Mai 2012
[id,id]=min(A(1,:))
Z = A(2:end,id)

Plus de réponses (1)

Wayne King
Wayne King le 23 Mai 2012
A = [ 6 2 3
7 9 0
8 3 4];
[minval,I] = min(A(1,:));
z = A(2:end,I);
  1 commentaire
FIR
FIR le 23 Mai 2012
Thanks wayne

Connectez-vous pour commenter.

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by