IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
strip_code.m
Go to the documentation of this file.
1 %>@ingroup string conversion
2 %>@file
3 %>@brief Extracts things like 'A' from things like 'code = "A"'
4 
5 function c = strip_code(params)
6 quote_indexes = regexp(params, '"');
7 if size(quote_indexes) < 2
8  c = '';
9 else
10  c = params(quote_indexes(1)+1:quote_indexes(2)-1); % extracts code from param string
11 end
12 
function strip_code(in params)