How to export the third dimension of a 3D single array?

29 ビュー (過去 30 日間)
BN
BN 2019 年 10 月 27 日
編集済み: Cris LaPierre 2019 年 10 月 27 日
I have 3d single variable (let's call it A):
A = (first dimansion*second dimansion*third dimension)
I want to know what is the value of the third dimension (what's in it) is it possible?
I need to check it if it's sorted or not, so i need to know what is the numbers in the third dimension.
Thank you

採用された回答

Cris LaPierre
Cris LaPierre 2019 年 10 月 27 日
編集済み: Cris LaPierre 2019 年 10 月 27 日
So your variable has 3 dimensions? If you ran the command size(A), you should get three numbers, something like m x n x z.
If that is the case, then you can consider your variable a stack of 2D sheets, where each sheet contains an m x n matrix. The question, then, is which sheet do you want to view? The notation is straightforward. Do the following to extract all the values in the first sheet.
tmp = A(:,:,1)
You can learn more about indexing in Chapter 5 of MATLAB Onramp.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by