CLEANUP - changes to folder structure

This commit is contained in:
Silas Oettinghaus
2026-03-25 10:57:48 +01:00
parent 0c5ad28f0a
commit 0ae846d3c3
351 changed files with 405 additions and 1294 deletions

View File

@@ -0,0 +1,30 @@
%% read_wpd_csv.m
% Minimal importer for WebPlotDigitizer multi-curve CSV
filename = 'wpd_datasets.csv'; % <-- set your file path here
T = readtable(filename);
% Read header row manually
fid = fopen(filename);
hdr1 = strsplit(strrep(fgetl(fid), '"', ''), ','); % curve names
hdr2 = strsplit(strrep(fgetl(fid), '"', ''), ','); % X/Y header row
fclose(fid);
% Extract unique curve names
names = hdr1(~cellfun('isempty',hdr1));
% Create struct for each curve
mii = struct();
for i = 1:numel(names)
base = matlab.lang.makeValidName(strrep(names{i},' ','_'));
xi = 2*(i-1)+1; % X column
yi = xi+1; % Y column
mii.(base).X = T{:,xi};
mii.(base).Y = T{:,yi};
% also create workspace variable "name_wpd"
assignin('base',[base '_wpd'], mii.(base));
end
disp('Imported datasets:');
disp(fieldnames(mii));