www.pudn.com > TimeFrequency.rar > mnem2tex.m


function mnemo=mnem2tex(mnemi)
% Function substitutes TeX-style mnemonics for input mnemonics (used for
% axis annotationn plots, legends, etc); e.g. DT_S ==> DT\_S
%
% Written by: E. R.: May, 6, 2000
% Last updated: E. R.: September 20, 2001: Handle case when the correction 
%                                               has already been made
%          mnemo=mnem2tex(mnemi)
% INPUT
% mnemi    string or cell with input mnemonic
% OUTPUT
% mnemo    string with output mnemonic

mnemo=strrep(mnemi,'\_','_');   % If the substitution has already been made: reverse it
mnemo=strrep(mnemo,'_','\_');