Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
Firas Al-Kharabsheh
Firas Al-Kharabsheh 2016년 5월 3일
마감: MATLAB Answer Bot 2021년 8월 20일
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
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
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!

Translated by