Info

この質問は閉じられています。 編集または回答するには再度開いてください。

editing a variable

1 回表示 (過去 30 日間)
James
James 2011 年 8 月 6 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have a 1x50 structured array. However, there is only values in the last 10 cells.
Is it possible to turn this into a 1x10 structured array and how?

回答 (3 件)

Rick Rosson
Rick Rosson 2011 年 8 月 6 日
Please try:
Y = X(41:50);
OR:
Y = X(end-9:end);
HTH.
Rick

Fangjun Jiang
Fangjun Jiang 2011 年 8 月 6 日
Or X(1:end-10)=[]

James
James 2011 年 8 月 6 日
Thanks all!
  1 件のコメント
Oleg Komarov
Oleg Komarov 2011 年 8 月 6 日
Please accept the answer you feel best answered your needs.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by