view dealStruct.m @ 933:34b3d092a4d0 feature/timesteppers

Add methods timePoints and quadWeights to Rungekutta class.
author Martin Almquist <malmquist@stanford.edu>
date Mon, 03 Dec 2018 16:49:43 -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