Code covered by the BSD License  

Highlights from
spec file reader

image thumbnail
from spec file reader by Zhang Jiang
Monitor, read, save scans from SPEC files and calculate true reflectivity.

titlestr(a)
function b = titlestr(a)
% TITLESTR Convert a string with underscores to a string that can be
%   displayed in figures without recognizing underscores as subscript
%   flags.

if ~ischar(a)
    error('Invalid input argument.');
end
b = a;
c = findstr(a,'_');
for i = length(c):-1:1;
    b = [b(1:c(i)-1),'\',b(c(i):end)];
end
    
    

Contact us at files@mathworks.com