how to create n*n by 1 natrix from n by n matrix

조회 수: 1 (최근 30일)
Torkan
Torkan 2018년 8월 11일
댓글: KSSV 2018년 8월 11일
Hello,
I want to create 9 by 1 matrix using the 3 by 3 matrix. It means that the second column should be below the first column and then the third one below the second one. This should be generalized to n by n matrix. Would you please help me?
Then I have another matrix. The same size. I should do the same thing there and then create one 3*3 by 2 matrix which the first column is the 9 arrays of the first matrix and the second column is the 9 arrays of the second matrix.
Thanks
  댓글 수: 2
Jan
Jan 2018년 8월 11일
편집: Jan 2018년 8월 11일
This sounds like a homework. The solution is very easy. Please read the "Getting Started" chapters of the documentation. Matlab's free "Onramp" will help also (use an internet search engine to find it).
The forum will not solve your homework.
KSSV
KSSV 2018년 8월 11일
Read about reshape and MATLAB matrix indexing.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by