annotate stuffStruct.m @ 975:47b48a97c675 feature/getBoundaryOperator

Stupid merge makes this branch dangerous. Merging with other branches will result in unexpected changes. Never merge this branch with anything. Closing branch.
author Martin Almquist <malmquist@stanford.edu>
date Thu, 03 Jan 2019 13:24:39 +0100
parents 7ea4b6de59d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
893
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
1 function s = stuffStruct(varargin)
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
2 s = struct();
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
3
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4 for i = 1:nargin
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
5 assert(~isempty(inputname(i)), 'All inputs must be variables.');
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
6 s.(inputname(i)) = varargin{i};
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
7 end
7ea4b6de59d9 Add a stuffStruct(), the reverse of dealStruct()
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
8 end