Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

if i have matrix how to make another matrix its size like this ?

1 view (last 30 days)
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 Comments
John D'Errico
John D'Errico on 3 May 2016
Edited: John D'Errico on 3 May 2016
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
Stephen23 on 3 May 2016
Edited: Stephen23 on 3 May 2016
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?

Answers (0)

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!