Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

1 Ansicht (letzte 30 Tage)
Mr M.
Mr M. am 30 Okt. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Is it possible to do the following withot a for cycle? for n = 1:N, data(n).x = []; end

Antworten (1)

madhan ravi
madhan ravi am 30 Okt. 2018
Bearbeitet: madhan ravi am 30 Okt. 2018
data(1:N).x = []; %edited after Stephens comment
  2 Kommentare
Stephen23
Stephen23 am 30 Okt. 2018
The square brackets are not required and just hinder JIT optimization.
madhan ravi
madhan ravi am 30 Okt. 2018
Thanks Stephen read it before but forgot this time

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by