how to read each element of a 3d matrix of dimension (512,256,128) from a file

4 ビュー (過去 30 日間)
lafnath p
lafnath p 2016 年 10 月 21 日
編集済み: KSSV 2016 年 10 月 21 日
read each element from a 3d matrix easily

回答 (1 件)

KSSV
KSSV 2016 年 10 月 21 日
編集済み: KSSV 2016 年 10 月 21 日
Let 'r' be the row number you want to access, 'c' be the column you want to access and 'n' be the thrid dimension you want to access. Then you can access the respective number using M(r,c,n) ; Where M is your (512,256,128) matrix.
If you want to access complete matrix, say n = 3 ; Then
M3 = M(:,:,3) ;
If you want complete first from 4'th matrix.
M(1,:,4)
Accessing elements in 3D is similar to 2D, but in 3D you have to mention the third index.
  1 件のコメント
lafnath p
lafnath p 2016 年 10 月 21 日
i want to access each element from another file to current mat file

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by