Help with cat command-URGENT HELP NEEDED

조회 수: 1 (최근 30일)
Fawaz Amjad
Fawaz Amjad 2018년 3월 3일
댓글: Walter Roberson 2018년 3월 3일
Hi, So I am having trouble using cat command as it is not giving me the output I need. The variables are b1 ( 7351x8171 uint8) and same for b2 and b3. I am using C = cat(3,b1,b2,b3) since there are three variables so three dimensions and then after that the software is busy for really long time and runs the rows and columns of numbers without end. The main question is that I need to use cat command and the variables b1, b2 and b3 to create an RGB image and store it in the variable I_RGB. Please help me with this issue ASAP

답변 (1개)

Walter Roberson
Walter Roberson 2018년 3월 3일
C = cat(3,b1,b2,b3);
That is, just put a semi-colon after the assignment to prevent the result from displaying to the screen.
You could also consider using
C = b1(:,:,[1 1 1]);
C(:,:,2) = b2;
C(:,:,3) = b3;

카테고리

Help CenterFile Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by