source: prextra/enablemeta.m @ 41

Last change on this file since 41 was 5, checked in by bduin, 14 years ago
File size: 695 bytes
Line 
1%ENABLEMETA  enable the storage of key-value pairs in a user field
2%
3%    B=ENABLEMETA(A)
4%
5% INPUT
6%    A   input dataset
7%
8% OUTPUT
9%    B   output dataset with initialized meta structure
10%
11% DESCRIPTION
12% Enables the use of named key-value pairs in a dataset. These are
13% stored inside the user field of a dataset.
14%
15% Technically, ENABLEMETA adds a field meta to the user structure.  It
16% contains the cell-arrays 'keys' and 'values'. Other fields of the user
17% structure than meta are not altered.
18%
19% SEE ALSO
20% ADDMETA, REMOVEMETA, GETMETA, SETMETA
21
22function a=enablemeta(a)
23   
24    u=a.user;
25
26    meta.keys={};
27    meta.values={};
28    u.meta=meta;
29   
30    a.user=u;
31   
32    return   
Note: See TracBrowser for help on using the repository browser.