Unable to generate report using Embedded Web View

조회 수: 3 (최근 30일)
Biswajit Barik
Biswajit Barik 2019년 5월 2일
편집: Stefanie Schwarz 2020년 9월 3일
Hello,
I have been trying to use the Simulink Report Generator toolbox and recreate the example as mentioned on
I created 2 files, SystemDesignVariables.m and testdata.m which is defined as class definition and report generation function.
However, when I try to execute testdata.m , followin error pops up
"Error using SystemDesignVariables
The specified superclass 'slreportgen.webview.EmbeddedWebViewDocument' contains a parse error,
cannot be found on MATLAB's search path, or is shadowed by another file with the same name.
Error in testdata (line 4)
rpt = SystemDesignVariables(rptName, model);"
Am I missing something in here? Can someone help to address this ?

답변 (2개)

Sreelakshmi S.B
Sreelakshmi S.B 2019년 5월 7일
Generally the error 'cannot be found on MATLAB's search path, or is shadowed by another file with the same name.' is received when there is a user defined function in the MATLAB search path which has the same name as the MATLAB built-in function. In order to resolve the issue follow the troubleshooting steps below:
a) Manually go through the MATLAB search path and remove the paths which have functions conflicting with inbuilt MATLAB functions. Execute the following command to get the list of the current search path.
>> path
The following command may help to find the source of the issue:
>> which -all <conflicting_function>
b) If you are unsure of which paths to remove or the above command displays only one line, restore the MATLAB search path to its factory-installed state by executing the following command :
>> restoredefaultpath
Notice that the above command may remove the paths that you have previously added to MATLAB search path in order for your scripts to work. So it is advisable to save a backup copy of the current MATLAB search path before running the command.
You can refer to the following link to the documentation to backup the current search path:

Stefanie Schwarz
Stefanie Schwarz 2020년 9월 2일
편집: Stefanie Schwarz 2020년 9월 3일
In addition to this, be aware that the slreportgen.webview.EmbeddedWebViewDocument class has only been introduced in R2017a. It is not available in older releases. See the note at the bottom of the following doc page:

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by