/ concept-collection / seqlab
Sign in
concept-collection / seqlab
seqlab / src / engine / pulseq / +mr / +aux / globalVars.m
20 lines · 480 BCodeBlameHistory
78d04f1seqlab: write and view pulseq MRI sequences in the browserJeremy Magland 1function out = globalVars(get_set,var,val)
2%GLOBAL Auxilary function to get or set global variables
3
4persistent SupportedLabels;
5
6if strcmp(get_set,'get')
7 eval(['out=' var ';']);
8elseif strcmp(get_set,'set')
9 if nargin<3
10 error('globalVars: missing the third argument');
11 end
12 eval([var '=val;']);
13elseif strcmp(get_set,'reset')
14 clear(var);
15else
16 error('globalVars: the first parameter must be either get or set');
17end
19end
moveopenescclose