How to save multiple files in a 'for' loop
Afficher commentaires plus anciens
Hi everyone,
i am trying to save multiple files in a for loop.
however, the saved files of coordinate2 always inclueds the data from coordinate 1. 3 incluedes all data from 2 and 1.
i upload the first three files of coordinate to show the problems-
does anyone know how to save the data seperately in different files?
coordinate= [];
i =1:6;
for t=1:length(i)
load(['snakes_frame' num2str(t) '.mat']);
for a=1:length(snakes)
X = snakes{1,a}.x;
Y = snakes{1,a}.y;
coordinate=[coordinate,X, Y];
end
save(['C:\Users\length\coordinate' num2str(t) '.mat'],'coordinate');
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Structures dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!