Add code snippets

This commit is contained in:
2024-08-28 17:22:21 +02:00
parent de2368c07e
commit 064a0f75cb
32 changed files with 2354 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
%
% -----------------
% Copyright © 2022 ACK Cyfronet AGH, Poland.
% --------------
%
% Returns index of the column with the specified colName within the given catalog
%
% TODO use this function in extractColumns.m
function columnIdx = findCatalogColumn(catalog, colName)
for c=1:length(catalog)
if strcmp(catalog(c).field, colName)
columnIdx = c;
break;
end
end
if exist('columnIdx') ~= 1
error('no column named %s', colName);
end
end