how do I create a loop for to extract doubles variables from a cell array?
3 views (last 30 days)
Show older comments
Giulia GALFANO
on 20 Oct 2020
Commented: Giulia GALFANO
on 22 Oct 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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!