Mercurial > repos > public > sbplib
diff convergenceTable.m @ 251:6a5e94bb5e13
Bugfix convergenceTable->latexTable. Works with same input as plainTextTable now.
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Tue, 06 Sep 2016 10:36:33 +0200 |
parents | ddfb98209aa2 |
children | 2663be328d9a |
line wrap: on
line diff
--- a/convergenceTable.m Thu Jun 30 14:44:18 2016 +0200 +++ b/convergenceTable.m Tue Sep 06 10:36:33 2016 +0200 @@ -93,14 +93,14 @@ data = cell(1,length(m)); data{1} = num2str(m(1)); for j = 1:nOrders - data{1} = [data{1} ' & ' sprintf('%8.2f',log10(orders(j).e(1))) ' & ' ]; + data{1} = [data{1} ' & ' sprintf('%8.2f',log10(e{j}(1))) ' & ' ]; end data{1} = [data{1} '\\']; for i = 2:length(m) data{i} = [data{i} num2str(m(i)) ]; for j = 1:nOrders - data{i} = [data{i} ' & ' sprintf('%8.2f',log10(orders(j).e(i))) ' & ' sprintf('%8.2f',(orders(j).q(i-1))) ]; + data{i} = [data{i} ' & ' sprintf('%8.2f',log10(e{j}(i))) ' & ' sprintf('%8.2f',(q{j}(i-1))) ]; end data{i} = [data{i} '\\']; end @@ -118,10 +118,10 @@ function s = orderheaders(orders) - s= sprintf('\\multicolumn{2}{|c}{%dth order}',orders(1).order); + s= sprintf('\\multicolumn{2}{|c}{%dth order}',orders{1}); nOrders = length(orders); for i = 2:nOrders - s = [s sprintf('& \\multicolumn{2}{|c}{%dth order}',orders(i).order)]; + s = [s sprintf('& \\multicolumn{2}{|c}{%dth order}',orders{i})]; end s = [s ' \\']; end