필터 지우기
필터 지우기

Info

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

how to place the elements of three matrices alternatively in on matrix using for loop in matlab?

조회 수: 2 (최근 30일)
how to place the elements of three matrices alternatively in on matrix using for loop in matlab?
  댓글 수: 2
José-Luis
José-Luis 2017년 8월 11일
And since this is Matlab you probably don't want to be using a for loop for that, unless it's a homework question in which case you'd better start by reading the documentation because what you ask sounds pretty basic.

답변 (1개)

KSSV
KSSV 2017년 8월 11일
A = rand(2) ;
B = rand(2) ;
C = rand(2) ;
D1 = [A B C]
D2 = [A ;B ;C]
D3 = horzcat(A,B,C)
D4 = vertcat(A,B,C)
  댓글 수: 5
KSSV
KSSV 2017년 8월 11일
That's what I tell....here loop is not required...
a=[1 2;3 4] ;
b=[5 6;7 8] ;
c=[9 10;11 12] ;
d=[1 5 9;2 6 10;3 7 11;4 8 12] ;
a = a'; b = b' ; c = c' ;
D = [a(:) b(:) c(:)] ;
sravankumar v
sravankumar v 2017년 8월 16일
sir i want to create a singlebitplane(bp) of size 256x256 using three MSB bitplanes(b6,b7,b8) each of size 256x256 of a gray image and the bp should contains the pixels of the three bitplanes(b6,b7,b8) arranged in this manner bp=[b6 b7 b8 b6 b7 b8....... ;b6 b7 b8 b6 b7 b8....... ;.....] where size(bp)=256x256.

이 질문은 마감되었습니다.

태그

아직 태그를 입력하지 않았습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by