IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
replace_underscores.m
Go to the documentation of this file.
1
%>@ingroup
string
2
%> @file
3
%> @brief Replaces underscores with a
'-'
4
%>
5
%> @param s
string
of cell of strings
6
%> @
return
a string,
if
the input is a string, or a cell of strings,
if
the input is a cell of strings
7
function
s =
replace_underscores
(s)
8
flag_cell = iscell(s);
9
if ~flag_cell
10
s = {s};
11
end;
12
13
for
i = 1:numel(s)
14
s{i}(s{i} ==
'_'
) =
'-'
;
15
end;
16
17
if
~flag_cell
18
s = s{1};
19
end;
replace_underscores
function replace_underscores(in s)
m
misc
string
replace_underscores.m
Generated on Tue May 19 2015 20:46:05 for IRootLab by
1.8.9.1