Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
Mr M.
Mr M. le 30 Oct 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
Is it possible to do the following withot a for cycle? for n = 1:N, data(n).x = []; end

Réponses (1)

madhan ravi
madhan ravi le 30 Oct 2018
Modifié(e) : madhan ravi le 30 Oct 2018
data(1:N).x = []; %edited after Stephens comment
  2 commentaires
Stephen23
Stephen23 le 30 Oct 2018
The square brackets are not required and just hinder JIT optimization.
madhan ravi
madhan ravi le 30 Oct 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