Indexing matrix in matlab
显示 更早的评论
I have generated 3^n (n>1) matrices, then I want to compare them. How they can be indexed for the purpose of comparison. In fact I want to know distinct number of matrices and their frequencies.
回答(2 个)
Oleg Komarov
2011-4-12
0 个投票
How are those matrices generated, what are their dimensions, what kind of comparison...
Matt Fig
2011-4-12
You could put them into a cell array:
C = {magic(3) ones(3) zeros(3) magic(3) magic(3) ones(3)*6 zeros(3)};
isequal(C{1},C{2})
isequal(C{1},C{4})
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!