Create n arrays given a specified n with similar names
Mostra commenti meno recenti
% split into dfferent event arrays
no_events = length(event_id);
for i = 1:no_events; % no_events can be anything from 1 to 100, and I don't want to write 100 if/elseif statements
if i == 1
Event1 = [];
elseif i == 2
Event2 = [];
elseif i == 3
Event3 = [];
else
end
end
How can I write this more concisely?
1 Commento
Joseph
il 2 Ott 2014
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
