I have multiple spread sheets with multiple sheets that I want to write an indexing data import function for
Ältere Kommentare anzeigen
I am trying to plot graphs from three spreadsheets. Each spreadsheet is made up of multiple sheets of varying length, all that are continuously getting loger as I run simulations. I am currently importing each sheet individually and then having to edit the code to find the last value. The code for importing is below.
%
opts = spreadsheetImportOptions("NumVariables", 9);
%%
% Import element factor 8
%%
% Sheet D05 element factor 8
opts.Sheet = "D5";
opts.DataRange = "A2:I64";
%
% Specify column names and types
opts.VariableNames = ["E11", "E22", "E33", "G23", "G13", "G12", "nu23", "nu13", "nu12"];
opts.SelectedVariableNames = ["E11", "G12", "nu12"];
opts.VariableTypes = ["double", "double", "double", "double", "double", "double", "double", "double", "double"];
%
% Import the data
D05_8 = readtable("Y:\Ox-Ox_CMC\Spreadsheets\Reports\ttf_8\ttf8_convergence.xlsx", opts, "UseExcel", false);
This is repeated for the values D05, D15, D25, D35,D45 three times for a mesh element factor of 8,4, and 1. I woudl like to import all of the data with one function that I can then use to draw three graphs, that show a statistical convergence.
I am using either 2022b and/or 2021a
Hopefully someone can help, thanks.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!