MATLAB中N矩阵的交点
我有一个矩阵IntialMat
,并且具有其他n个矩阵的结构。我想拥有与矩阵IntialMat
相交的矩阵的索引。我该如何在MATLAB中这样做?
例如initialmat = [2,5,88; 55 63 4] 和结构矩阵有n个矩阵:
Mat1=[1, 55,12; 45 78]
Mat2=[12, 14; 42,165]
Mat3=[2,18,11; 13,80; 10, 99]
.
.
.
.
.
.
MatN=[4, 77;63,20]
我想要的结果是交叉点的值和名称 Matrice或其索引: 具有MAT3的值2(索引3) 带有MATN的值4(索引n)
I have a matrix IntialMat
, and I have a structure with N other matrices. I want to have the indices of the matrices that intersect with a least one element of the matrix IntialMat
. How can I do that in MATLAB?
For example InitialMat=[2, 5, 88; 55 63 4]
And structure MatriciesStor have N matrices :
Mat1=[1, 55,12; 45 78]
Mat2=[12, 14; 42,165]
Mat3=[2,18,11; 13,80; 10, 99]
.
.
.
.
.
.
MatN=[4, 77;63,20]
The result that I want is the value of the intersection and the name
of the matrice or its index:
the value 2 with Mat3 (index 3)
The value 4 with MatN (index N)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在这样的矩阵上循环:
给出类似的东西:
You can loop over the matrices like this:
which gives something like: