% if you want a BMP Figure (not a PDF Animation) use first line
if strcmp(SWPDForBMP,'BMP') && size(VocalTractVecToTime,1)>1
VocalTractVecToTime = VocalTractVecToTime(1,1:2);
end
%--- read and show
a = imread('vtLatex_FigureLauncher.bmp');
imshow(a);
elseif strcmp(SWPDForBMP,'PDF')
%-- tex2dvi
!latex -interaction=nonstopmode vtLatex_AnimationLauncher.tex
%--- view dvi
%!"C:/Program Files/MiKTeX 2.8/miktex/bin/yap.exe" vtLatex_AnimationLauncher.dvi
%--- dvi2ps
!dvips -o vtLatex_AnimationLauncher.ps vtLatex_AnimationLauncher.dvi
%---- ps2pdf
!ps2pdf vtLatex_AnimationLauncher.ps
%--- view pdf
!AcroRd32.exe vtLatex_AnimationLauncher.pdf
end
%===================================================================
% Matrix to a String Ordering with & intervening
%===================================================================
function STR = Mat2StrCustom(Matr)
R = size(Matr,1);
C = length(Matr{1,1});
STR = [];
for IndRow= 1:R
for IndCol = 1:C
STR = [STR num2str(Matr{IndRow,1}(IndCol)) '&'];
end
STR = [STR Matr{IndRow,2} '&'];
end
STR = STR(1:end-1);