Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
Firas Al-Kharabsheh
Firas Al-Kharabsheh el 3 de Mayo de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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 comentarios
John D'Errico
John D'Errico el 3 de Mayo de 2016
Editada: John D'Errico el 3 de Mayo de 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 el 3 de Mayo de 2016
Editada: Stephen23 el 3 de Mayo de 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?

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by