Help with cat command-URGENT HELP NEEDED

2 ビュー (過去 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 Center および File ExchangeImport, Export, and Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by