How to get minimum element of matrix and corresponding row elements

1 次查看(过去 30 天)
Hello Dears, I have matrix A of 3X10 as below:
A=[0.250 1.000 0.111 0.040 16.000 4.000 0.360 1.563 0.111 0.563 0.000 4.000 1.000 0.360 0.000 1.000 0.160 0.063 0.028 1.000 0.250 9.000 1.778 0.040 9.000 2.250 0.360 0.563 0.444 3.063]
norm of each row (N) as follows:
N= [23.9980 7.6110 26.7480]
I want to find minimum element of N (7.6110 in this case) and corresponding row elements in matrix A.
In this case minimum element in N is 7.6110 which is appears in 2nd row, and corresponding 2nd row elements in A:[0.000 4.000 1.000 0.360 0.000 1.000 0.160 0.063 0.028 1.000]
Pl some one help how to do this. Thanks in advance

采纳的回答

Roger Stafford
Roger Stafford 2015-1-10
编辑:Roger Stafford 2015-1-10
N = sqrt(sum(A.^2,2)); % I assume you mean the L2 norm
[Nmin,ix] = min(N);
Amin = A(ix,:);
where Nmin is the minimum row norm and Amin is the corresponding row of A.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Robust Control Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by