Model based design installtion problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Model based design installtion problem

668 次查看
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 项奖励
回复
3 回复数

650 次查看
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 项奖励
回复

648 次查看
jerry369
Contributor I

So how to solve it??

0 项奖励
回复

465 次查看
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

 
标记 (1)
0 项奖励
回复