Mercurial > repos > public > sbplib
comparison dealStruct.m @ 886:8894e9c49e40 feature/timesteppers
Merge with default for latest changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 16:36:21 -0800 |
parents | 95993ad2bd70 |
children | b7ec26da3d77 |
comparison
equal
deleted
inserted
replaced
816:b5e5b195da1e | 886:8894e9c49e40 |
---|---|
1 function varargout = dealStruct(s, fields) | |
2 default_arg('fields', fieldnames(s)); | |
3 | |
4 assert(nargout == length(fields), 'Number of output arguements must match the number of fields'); | |
5 | |
6 for i = 1:length(fields) | |
7 varargout{i} = s.(fields{i}); | |
8 end | |
9 end |