MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 怎么求出矩阵某一列在某一内范围所对应的行组成的新矩阵 (https://www.labfans.com/bbs/showthread.php?t=11843)

guohf 2010-07-08 21:02

怎么求出矩阵某一列在某一内范围所对应的行组成的新矩阵
 
怎么求出矩阵某一列在某一内范围所对应的行组成的新矩阵


a=[2 3 4 6
1 5 6 3
3 3 4 2]


取出矩阵a的第一列中小于等于2的所对应的行,组成的新矩阵

b=[2 3 4 6
1 5 6 3]

谢谢。

guohf 2010-07-09 10:21

回复: 怎么求出矩阵某一列在某一内范围所对应的行组成的新矩阵
 
问题已解决。用
b=a(find(a(:,1)<=2),:)


所有时间均为北京时间。现在的时间是 12:46

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.