我试图在我的报告中放置一个单元格数组,但是当我试图关闭报告时,我总是会收到错误。我想这是因为我的单元格数组中有数字和字符串,因为对于奇异类型数组,我没有任何问题。(然而,我试图用num2str扫描我的数组,并且得到了相同的错误.)
我是这样做的:
SectionPASS = Section;
SectionPASS.Title = 'PASS example';
[PASSrow,~] = find(cellfun(@(x)isequal(x,'PASS'),raw));
temp = (raw(PASSrow(1),:));
tablePASS = BaseTable(temp);
add(SectionPASS, tablePASS);
add(ChapterTests, SectionPASS);
add(rpt, ChapterTests);
close(rpt)
rptview(rpt)这给了我一个很长的java错误,以
Error in rptgen.utils.FOPProxy.foToPDF (line 84)
foToPDFImpl(h, foPath, pdfPath, locale, extraFonts, cleanupFonts);
Error in mlreportgen.report.ReportBase/close
Error in Master_Report (line 95)
close(rpt)我认为问题来自于BaseTable,因为如果我在临时项目上使用cell2table,它最终会工作,但它也会给出我不想要的标题.
temp =
2×20 cell array
{'lvl'} {'Mains, …'} {'Expected Mains …'} {'Protection …'} {'Mains m…'} {'Calculated…'} {'Calculated…'} {'Mains m…'} {'Final …'} {'Final…'} {'Test Case Summary'} {'No Transition t…'} {'Transition …'} {'Transition …'} {'Trace'} {'Plot File' } {'Matlab' } {'JPEG Fig' } {'Pass?Fail'} {' '}
{[ 2.6300]} {[ 295.6000]} {[ 295.7509]} {' pfc_ovp_snsboost'} {[ 295.6130]} {[ 416.6599]} {[ 2.6288]} {[ 295.4511]} {[ 416.4310]} {[ 2.6273]} {'ActiveX VT_ERRO…'} {[ 0]} {'PASS' } {[ 2.6280]} {'Matlab FIG\O_…'} {'JPG Plots\O_l…'} {'Matlab FIG\OVP_…'} {'JPG Plots\OVP_l…'} {'PASS' } {' '}你知道我该怎么做才能让这件事成功,因为我真的不明白?提前谢谢你。
发布于 2019-06-28 09:35:23
我用FormalTable来解决我的问题。不过,我仍然不知道为什么BaseTable会出错。
https://stackoverflow.com/questions/56792919
复制相似问题