MATLAB: MATLAB telling me I need product licenses for things I’m not using

image into tableMATLAB Report Generatorreport generator

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?

Best Answer

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);