用一个矩阵对另外一个矩阵进行筛选。
Show older comments
如题,我有两个矩阵A=[1,1,0,1;23,9,50,2;45,17,100,5;67,25,150,6]
B=[3,7,35;5,8,26;15,18,93]
其中矩阵A的四列分别为x,y,z,t。B的三列分别为x,y,z。我想在矩阵A中搜索符合这样条件的数据:即矩阵B的每一行的x,y,z与A的每一行x,y,z分别相减的绝对值的和的最小的数,并输出A矩阵中该行的数据,例如,C=[1,1,0,1;1,1,0,1;45,17,100]
Accepted Answer
More Answers (0)
Categories
Find more on 稀疏矩阵 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!