Creating and visualizing a table
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
This is a table format related issue. For that reason, I include all the code related to the formatting but not to the COP which gives us no trouble.
import mlreportgen.dom.*; doc=Document('/fully/qualified/path/to/restab'); table0 = ModelAdvisor.Table(4,4);
% column headings table0.setColHeading(1, ['var1 [%]']); table0.setColHeading(2, ['var2 [ms]']); table0.setColHeading(3, ['var3 [%]']); table0.setColHeading(4, ['var4 [ms]']);
% row headings for n=1:4 table0.setRowHeading(n,['Fs=',num2str(FsArr(n))]); end
for n=1:length(FsArr) Fs= [...] ; % GP optimizations here cvx_begin gp quiet [...]; cvx_end cvx_status var1(n)=[..]; var2(n)=[..]; var3(n)=[..]; var4(n)=[..];
% Set table content
rowIndex=n;
table0.setEntry(rowIndex,1,num2str(var1(n)));
table0.setEntry(rowIndex,2,num2str(var2(n)));
table0.setEntry(rowIndex,3,num2str(var3(n)));
table0.setEntry(rowIndex,4,num2str(var4(n)));
end;
append(doc,table0); close(doc); rptview(doc.OutputPath); The result of the above is a correct optimized set of results, but when we try to visualize the table , we only get a window whose only tab is entitled "root.html", and with mention (in the window of: "[1x1 ModelAdvisor.Table]".
The question is we are probabby missing something about format and all, would any one care to give us pointers on how to visualize formatted table of type 'table0' ? Thanks.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!