1 ## function str=headerstring(what,value,kind)
3 ## returns a string for incorporation in an edf-header
4 ## what is the information item (e.g. 'Dim_1')
6 ## kind is string, char, integer, logical, float or double
9 ## 30.09.2009 (HSu): Updated to work with double and char data types
11 ## * add logical data type
13 function str=headerstring(what,value,kind)
18 case {'string', 'char'},
19 str=[str sprintf('%s ',value')];
20 case {'integer', 'logical'},
21 str=[str sprintf('%i ',value')];
22 case {'float', 'double'}
23 str=[str sprintf('%g ',value')];
25 printf("Unknown data type in header %s\n",kind);
28 str = [str sprintf(';\n')];