![Capture.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/213746/Capture.png)
confusion in cat command
2 ビュー (過去 30 日間)
古いコメントを表示
I am reading matlab online documentation for fliplr command and there and i came across a command 'cat'
It is used for concatenation.
First argument of cat command specifes dimension along which concatenation. example if first argument is 1 ,matrices are concatenaated along coulmns and if first argumetn is 2, matrices will be concatenated along rows. But what if first argument is 3 as in this scenario
I am confused how it is acting as shown in current scenario in attached photo. What will be contents of A ? and what is the meaning of highligted lines?![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/213717/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/213717/image.png)
0 件のコメント
採用された回答
Image Analyst
2019 年 4 月 14 日
3 means the 2-D arrays are being stacked along the 3rd dimension. To visualize, imagine that the arrays are gray scale images in the x-y plane. Now you use cat() to stack them vertically along the third, Z, dimension. See image below, and attached demo script.
![Capture.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/213746/Capture.png)
The 3-D image above would represent a color image.
Another case could be where you have lots of images, like slices from a CT or MRI scan. These images, stacked along the 3rd dimension would represent a volumetric images.
If the number were 4, then it could mean that you're stacking 3-D (color) images along the 4th dimension (representing time) to create a movie.
Does that explain it sufficiently to you?
その他の回答 (1 件)
madhan ravi
2019 年 4 月 14 日
3 represents that the contents of A concatenated in 3rd dimension hence creating a 3D matrix.
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!