Printing a LaTeX Table with Some Number and some Words
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Michael
il 22 Ott 2013
Commentato: Kelly Kearney
il 23 Ott 2013
I have a string:
sDetNamesGe = {'T1Z2', 'T1Z5', 'T2Z3','T2Z5', 'T3Z2','T3Z4',...
'T3Z5','T3Z6', 'T4Z2', 'T4Z4', 'T4Z5','T4Z6', 'T5Z4', 'T5Z5'};
and I have a matrix and I know how to concatenate them...but I want the results to print in a LaTeX table something like:
T1Z2 & matelem11 & ... \\
T1Z5 & matelem12 & ...\\
I think you get the picture. IS there a quick way to force string to print when using latex()? What might you do to print letters and numbers in a tex'd up table such as the one above?
Thanks for your time!
0 Commenti
Risposta accettata
Kelly Kearney
il 22 Ott 2013
You mean like this?
sDetNamesGe = {'T1Z2', 'T1Z5', 'T2Z3','T2Z5', 'T3Z2','T3Z4',...
'T3Z5','T3Z6', 'T4Z2', 'T4Z4', 'T4Z5','T4Z6', 'T5Z4', 'T5Z5'};
data = [sDetNamesGe; num2cell(1:length(sDetNamesGe))];
sprintf('%s & matelem%d \\\\\n', data{:})
2 Commenti
Kelly Kearney
il 23 Ott 2013
Same basic idea:
data = [sDetNamesGe' num2cell(TFWL_pos_det)]';
sprintf('%s & %.2f & %.2f & %.2f \\\\\n', data{:})
Più risposte (0)
Vedere anche
Categorie
Scopri di più su LaTeX in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!