Info
此问题已关闭。 请重新打开它进行编辑或回答。
if i have matrix how to make another matrix its size like this ?
1 次查看(过去 30 天)
显示 更早的评论
if i have
MatrixA =[ 1 1 0 1 1 1 1 0 1 1
1 1 1 0 1 1 1 1 1 1
1 1 1 1 0 1 1 1 1 1
0 0 0 1 0 1 1 0 1 1
1 0 0 0 1 1 0 1 0 1
1 0 0 0 1 1 0 0 1 1
1 1 0 0 1 1 1 0 1 1
1 1 0 0 1 1 0 0 1 1
1 0 1 0 1 0 1 1 1 1
1 1 1 1 1 1 1 1 1 1 ];
[N,M]= size(MatrixA);
and
Cmin = [ 0 0 0 0 0 0 0 2 4
0 0 0 0 0 0 2 1 1
0 0 0 0 0 2 2 1 2
0 0 0 0 0 0 0 3 2
0 0 0 0 0 0 0 1 3
0 0 0 0 0 0 3 2 2
0 0 0 0 0 2 1 1 1
0 0 0 0 0 0 1 2 1
0 0 0 0 0 0 2 1 1
0 0 0 0 0 0 2 2 3
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 ]
How to make this matrix size = (N,M/2)
2 个评论
John D'Errico
2016-5-3
编辑:John D'Errico
2016-5-3
What is the relationship between those matrices, since there is no apparent pattern?
In fact, the sizes that you show are not even remotely correct. The first matrix is 10x10. So N=10, M=10.
The second matrix has 15 rows, and 9 columns. That is not N by M/2.
Stephen23
2016-5-3
编辑:Stephen23
2016-5-3
Well, given that the question asks "How to make this matrix size = (N,M/2)", it might be acceptable that they are different sizes, as the aim is to change their size. The solution would then most likely involve indexing, in which case the OP has already been advised to do the introductory MATLAB tutorials and to learn basic MATLAB usage themselves.
The long list of very similar questions asked every two hours by this OP is indicative of lack of knowledge about basic MATLAB usage:
Perhaps they might finally like to actually consider doing some MATLAB tutorials and learning how to use MATLAB?
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!