how do I create a loop for to extract doubles variables from a cell array?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Giulia GALFANO
el 20 de Oct. de 2020
Comentada: Giulia GALFANO
el 22 de Oct. de 2020
I have a cell array (10x1) that contain 10 [300x2000] double variables. I need to extract each double varables contained in each cell, rename it with the name "raster_data" and save each of them in a separate file.mat. This for loop allows me to generate a file.mat, but for achieve my final goal I should insert in each file.mat the variable "raster_data" .
Do you have any idea how I can complete the loop for?
for greater clarity I enclose also the data on which I have worked
thanks for any suggestion
for k = 1 : length(filename)
baseFileName = sprintf('%s.mat', filename{k});
fullMatFileName = fullfile(folder, baseFileName);
save(fullMatFileName, 'raster_labels');
end
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!