view dealStruct.m @ 889:f5e14e5986b5 feature/timesteppers

Remove getState from TimeStepper and derived classes - Currently no need for that functionality. Remove it.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 15 Nov 2018 17:29:30 -0800
parents 95993ad2bd70
children b7ec26da3d77
line wrap: on
line source

function varargout = dealStruct(s, fields)
    default_arg('fields', fieldnames(s));

    assert(nargout == length(fields), 'Number of output arguements must match the number of fields');

    for i = 1:length(fields)
        varargout{i} = s.(fields{i});
    end
end