I am trying to read in about 90 excel files and read in various temperatures and pressures for each excel file. Meaning, I want to log and plot Run 1 with Pressure 1 and temp 1, Run 2 with pressure 2 and temp 2, etc. How do i get the code below to add the run numbder after the B1P('instert run number here')
D = 'C:\Users\test';
S = dir(fullfile(D,'*.xlsx'));
for k = 1:numel(S)
F = fullfile(D,S(k).name);
numdata1 = xlsread(F);
opts=detectImportOptions(F);
opts.VariableNamesRange='A5';
opts.DataRange='A6';
B1P1 = numdata1(:,18)
A1P1 = numdata1(:,15)
B2P1 = numdata1(:,19)
A2P1 = numdata1(:,16)
B3P1 = numdata1(:,20)
end
4 Comments
Walter Roberson (view profile)
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/474301-importing-excel-file-and-reading-data#comment_730335
Alex Burbee (view profile)
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/474301-importing-excel-file-and-reading-data#comment_730336
Walter Roberson (view profile)
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/474301-importing-excel-file-and-reading-data#comment_730339
Alex Burbee (view profile)
Direct link to this comment
https://de.mathworks.com/matlabcentral/answers/474301-importing-excel-file-and-reading-data#comment_730341
Sign in to comment.