IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
good_varname.m
Go to the documentation of this file.
1 %>@ingroup gencode string
2 %>@file
3 %>brief Replaces invalid characters in name with an underscore ('_')
4 %
5 %> @param name
6 function name = good_varname(name)
7 len = size(name, 2);
8 for i = 1:len
9  ch = name(i);
10  if sum(ch == [65:65+25 97:97+25 48:48+9]) == 0 && sum(ch == ['_']) == 0
11  name(i) = '_';
12  end;
13 end;
14 
function good_varname(in name)
MATLAB code generation to create, boot, train and use blocks.
Definition: gencode.m:9