필터 지우기
필터 지우기

Making two matrices have the same size

조회 수: 3 (최근 30일)
med-sweng
med-sweng 2014년 2월 23일
댓글: Image Analyst 2014년 2월 23일
I have the following two matrices, with the following sizes:
A: 71x1
B: 14x14
How can I make them both of size
14x14?
Can we use some sort of padding with zeros for instance?
How can we go about that?
Thanks.
  댓글 수: 1
Image Analyst
Image Analyst 2014년 2월 23일
How you do it depends on what direction you want the 71 pixels to go (before they run out): down or across.

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

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 2월 23일
편집: Azzi Abdelmalek 2014년 2월 23일
A=rand(71,1) % Example
A=reshape([A;zeros(14*14-71,1)],14,14)

추가 답변 (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