Info
This question is closed. Reopen it to edit or answer.
Is it possible to set all data(n).x = []; without a for cycle?
    3 views (last 30 days)
  
       Show older comments
    
Is it possible to do the following withot a for cycle? for n = 1:N, data(n).x = []; end
0 Comments
Answers (1)
  madhan ravi
      
      
 on 30 Oct 2018
        
      Edited: madhan ravi
      
      
 on 30 Oct 2018
  
      data(1:N).x = [];  %edited after Stephens comment
2 Comments
  Stephen23
      
      
 on 30 Oct 2018
				The square brackets are not required and just hinder JIT optimization.
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

