Info

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

Is it possible to set all data(n).x = []; without a for cycle?

1 回表示 (過去 30 日間)
Mr M.
Mr M. 2018 年 10 月 30 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Is it possible to do the following withot a for cycle? for n = 1:N, data(n).x = []; end

回答 (1 件)

madhan ravi
madhan ravi 2018 年 10 月 30 日
編集済み: madhan ravi 2018 年 10 月 30 日
data(1:N).x = []; %edited after Stephens comment
  2 件のコメント
Stephen23
Stephen23 2018 年 10 月 30 日
The square brackets are not required and just hinder JIT optimization.
madhan ravi
madhan ravi 2018 年 10 月 30 日
Thanks Stephen read it before but forgot this time

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by