MATLAB telling me I need product licenses for things I'm not using?

조회 수: 2 (최근 30일)
PromoCodeBSJ
PromoCodeBSJ 2018년 10월 10일
댓글: PromoCodeBSJ 2018년 10월 10일
import mlreportgen.dom.*;
import mlreportgen.report.*
rpt = Report('C:\Users\GOE7ABT\Desktop\myreport1.pdf');
bojack=Image('C:\Users\GOE7ABT\Desktop\21-bojack-12.w710.h473.jpg');
table=Table();
%entryadsfsdaf=TableEntry(bojack);
row1=TableRow();
append(row1,bojack)
add(rpt,table)
close(rpt);
rptview(rpt.OutputPath);
Above is Code and below is error:
To use 'append', at least one of the following products must be licensed, installed, and enabled:
Control System Toolbox
Mapping Toolbox
System Identification Toolbox
Error in sad (line 11)
append(row1,bojack)
I am trying to use the report generator toolkit to add an image into a table, but I get this error, why?
  댓글 수: 2
Walter Roberson
Walter Roberson 2018년 10월 10일
Might perhaps not have been defined in your release. You are probably looking at the latest documentation.
PromoCodeBSJ
PromoCodeBSJ 2018년 10월 10일
No it was released in 2014b and I have 2017b..

댓글을 달려면 로그인하십시오.

채택된 답변

Rahul Singhal
Rahul Singhal 2018년 10월 10일
An Image can not be directly appended to a TableRow. I would suggest to create a TableEntry with the Image, and then append TableEntry to TableRow, followed by appending TableRow to the Table.
import mlreportgen.dom.*;
import mlreportgen.report.*
rpt = Report('C:\Users\GOE7ABT\Desktop\myreport1.pdf');
bojack=Image('C:\Users\GOE7ABT\Desktop\21-bojack-12.w710.h473.jpg');
table=Table();
entry=TableEntry(bojack);
row1=TableRow();
append(row1,entry);
append(table,row1);
add(rpt,table)
close(rpt);
rptview(rpt.OutputPath);
  댓글 수: 6
Rahul Singhal
Rahul Singhal 2018년 10월 10일
For using ScaleToFit format, you also need to specify entry height and width. See https://www.mathworks.com/help/rptgen/ug/mlreportgen.dom.scaletofit-class.html#buj0s73-2
One of the way is:
entry=TableEntry(bojack);
entry.Style = {Height('2in'), Width('2in')};

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator Task Examples에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by