19 lines
500 B
Mathematica
19 lines
500 B
Mathematica
|
%
|
||
|
% -----------------
|
||
|
% 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
|