shared-snippets/matlab/export/extractGdfFields.m

16 lines
428 B
Mathematica
Raw Normal View History

2024-08-28 12:59:02 +02:00
%
% -----------------
% Copyright © 2020 ACK Cyfronet AGH, Poland.
%
% This work was partially funded by EPOS Project funded in frame of PL-POIR4.2
% --------------
%
function [varargout] = extractGdfFields(gdf, fieldNames)
for i = 1:length(fieldNames)
fieldName = fieldNames{i};
assert(isfield(gdf.d, fieldName), ['gdf has no field with name: ' fieldName])
varargout{i} = getfield(gdf.d, fieldName);
end
end