moveToNextHole in Report Generator does not compile.

5 ビュー (過去 30 日間)
A Huang
A Huang 2016 年 5 月 4 日
コメント済み: farzad 2020 年 5 月 21 日
I am using Matlab 2015b 32bit with Report Generator and compiler. moveToNextHole does not compile in the following example from the user guide:
======
function makerpt(title,author,content,rptname,rpttemplate) import mlreportgen.dom.* rpt = Document(rptname,'docx',rpttemplate);
while ~strcmp(rpt.CurrentHoleId,'#end#')
switch rpt.CurrentHoleId
case 'Title'
append(rpt,title);
case 'Author'
append(rpt,author);
case 'Content'
append(rpt,content);
end
moveToNextHole(rpt);
end
close(rpt);

採用された回答

Paul Kinnucan
Paul Kinnucan 2016 年 5 月 12 日
To be compilable, a MATLAB application that uses the DOM API must invoke makeDOMCompilable() before invoking any DOM function. See makeDOMCompilable.
  2 件のコメント
A Huang
A Huang 2016 年 5 月 18 日
It works. Thanks a lot.
farzad
farzad 2020 年 5 月 21 日
dear Paul if I have a function in which I import rpt generator, should I use this command before calling that function or right before that line of importing ?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeReport Generator Creation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by