Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
Mr M.
Mr M. el 30 de Oct. de 2018
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Is it possible to do the following withot a for cycle? for n = 1:N, data(n).x = []; end

Respuestas (1)

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by