Is there a way to run a loop through subfiles in a file?

1 次查看(过去 30 天)
So I saved an excel workbook into matlab format . The excel document had multiple sheets and each of those sheets was created into a subfile of the saved data file. Each of those subfiles has values I need to run into a code individually (like in a for loop) but I don't know how to write the file in a way the code recognizes it has to go through each and every single subfile . An example of what I did to convert my excel workbook and give each sheet a name is provided.
So DATA0 contains RAW and DATA. but RAW has subfiles called RAW.RAW1, RAW.RAW2 , RAW.RAW3, etc.
I want to add to my code a way to loop through those RAW.RAW# and get the values necessary to run the program.
I hope I was able to explain my problem.
if true
clc, clear, close
[NUM,TXT,DATA]=xlsread('ACTE Flight Maneuvers v21.xlsx',5);
for kk=1:length(NUM) kks = num2str(kk);
[VAL,TXT2,RAW0]=xlsread('ACTE Flight 19 -Flow Analysis.xlsx',kk,'A2:C69'); raws = cat(2,'RAW',kks); RAW.(raws) = RAW0;
end
save DATA0 DATA RAW
load DATA0 end

采纳的回答

Image Analyst
Image Analyst 2015-6-30

更多回答(0 个)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by