Model based design installtion problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Model based design installtion problem

671 Views
jerry369
Contributor I
Im getting errors on verfiying the installed nxp packages in matlab

>>
NXP_Support_Package_S32K1xx
Error using contains
First argument must be text.

Error in
NXP_Support_Package_S32K1xx>OpenToolbox_Callback (line 231)
result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K1xx');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in
gui_mainfcn (line 95)
feval(varargin{:});
^^^^^^^^^^^^^^^^^^
Error in
NXP_Support_Package_S32K1xx (line 34)
gui_mainfcn(gui_State, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)NXP_Support_Package_S32K1xx('OpenT...
 
Error using matlab.ui.internal.controller.uicontrol.UIControlController/triggerActionEvent (line 76)
Error while evaluating UIControl Callback.

 
0 Kudos
Reply
3 Replies

653 Views
tim753milner
Contributor I

Hello,

The key error here is:

Error using contains
First argument must be text.
This means the variable toolboxes(i).Name passed to contains is not a string or char array, which it must be.

 

Best Regard,

Tim

0 Kudos
Reply

651 Views
jerry369
Contributor I

So how to solve it??

0 Kudos
Reply

468 Views
AlexCloutierDyname
Contributor I

Hello Jerry,

I just had the same problem. 

In NXP_Support_Package_S32K3xx.m, replace these lines : 

result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3xx');
 
with: 
if isempty(toolboxes(i).Name)
else
result(i) = contains(toolboxes(i).Name, 'NXP_MBDToolbox_S32K3xx');
end
 
In my case, it seems like the toolboxes variable had an empty member, which caused the error. 
AlexCloutierDyname_0-1753212718436.png

 

You need to do this replacement three times in the .m.

Hope this helps,

Alex

 
Tags (1)
0 Kudos
Reply