delete rows in 3d-matrix

2 ビュー (過去 30 日間)
Tim
Tim 2012 年 11 月 7 日
Hi all,
How can I delete a row in a 3d matrix? I want to delete the upper row in the matrices: stuff(:,:,1:3)
stuff(:,:,1(:,1))=[]
doesn't work..
"Unbalanced or unexpected parenthesis or bracket."
Does anyone know the answer? Thanks.
Cheers,
T
  2 件のコメント
Jan
Jan 2012 年 11 月 7 日
What exactly is "the upper row"?
Image Analyst
Image Analyst 2012 年 11 月 7 日
Not sure what you mean. In 3D people talk about a "slice" or a "plane" not a row. You can't eliminate just row 1 of slices 1, 2, and 3 because then the array is no longer rectangular - it would have a notch or chunk out of it. But you can get rid of a whole slice at a time.

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

採用された回答

Tim
Tim 2012 年 11 月 8 日
Thought about this last night in bed and couldn't understand the stupid mindtwist I made, it's just simply:
stuff(1,:,:)=[]
And indeed it's the upper slice. My bad. Thanks anyway!
  1 件のコメント
Image Analyst
Image Analyst 2012 年 11 月 8 日
Normally slices are the last dimension, like Jan had. So I guess you're taking the left-most slice that lies in the (row, slice), or Y-Z plane, basically the left face of the data volume, at least according to how most people think of it.

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

その他の回答 (1 件)

Jan
Jan 2012 年 11 月 7 日
stuff(:, :, 1) = []

カテゴリ

Help Center および File ExchangeJust for fun についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by