Model based design installtion problem

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

Model based design installtion problem

1,218 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

1,200 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

1,198 Views
jerry369
Contributor I

So how to solve it??

0 Kudos
Reply

1,015 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
%3CLINGO-SUB%20id%3D%22lingo-sub-2130022%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EModel%20based%20design%20installtion%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2130022%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3EIm%20getting%20errors%20on%20verfiying%20the%20installed%20nxp%20packages%20in%20matlab%3CBR%20%2F%3E%3CBR%20%2F%3E%26gt%3B%26gt%3B%20%3C%2FSPAN%3E%3CSPAN%3ENXP_Support_Package_S32K1xx%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3EError%20using%20%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3Amatlab.lang.internal.introspective.errorDocCallback('contains')%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Econtains%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%3CBR%20%2F%3EFirst%20argument%20must%20be%20text.%3CBR%20%2F%3E%3CBR%20%2F%3EError%20in%20%3C%2FSPAN%3E%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3E%3CSPAN%3ENXP_Support_Package_S32K1xx%26gt%3BOpenToolbox_Callback%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3A%20opentoline('C%3A%5CUsers%5Cjerry%5CAppData%5CRoaming%5CMathWorks%5CMATLAB%20Add-Ons%5CToolboxes%5CNXP%20Support%20Package%20S32K1xx%5CNXP_Support_Package_S32K1xx.m'%2C231%2C0)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Eline%20231%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E)%3CBR%20%2F%3Eresult(i)%20%3D%20contains(toolboxes(i).Name%2C%20'NXP_MBDToolbox_S32K1xx')%3B%3CBR%20%2F%3E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%3CBR%20%2F%3EError%20in%20%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3Amatlab.lang.internal.introspective.errorDocCallback('gui_mainfcn'%2C%20'C%3A%5CProgram%20Files%5CMATLAB%5CR2025a%5Ctoolbox%5Cmatlab%5Cguide%5Cgui_mainfcn.m'%2C%2095)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Egui_mainfcn%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3A%20opentoline('C%3A%5CProgram%20Files%5CMATLAB%5CR2025a%5Ctoolbox%5Cmatlab%5Cguide%5Cgui_mainfcn.m'%2C95%2C0)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Eline%2095%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E)%3CBR%20%2F%3Efeval(varargin%7B%3A%7D)%3B%3CBR%20%2F%3E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%3CBR%20%2F%3EError%20in%20%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3Amatlab.lang.internal.introspective.errorDocCallback('NXP_Support_Package_S32K1xx'%2C%20'C%3A%5CUsers%5Cjerry%5CAppData%5CRoaming%5CMathWorks%5CMATLAB%20Add-Ons%5CToolboxes%5CNXP%20Support%20Package%20S32K1xx%5CNXP_Support_Package_S32K1xx.m'%2C%2034)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3ENXP_Support_Package_S32K1xx%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3A%20opentoline('C%3A%5CUsers%5Cjerry%5CAppData%5CRoaming%5CMathWorks%5CMATLAB%20Add-Ons%5CToolboxes%5CNXP%20Support%20Package%20S32K1xx%5CNXP_Support_Package_S32K1xx.m'%2C34%2C0)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Eline%2034%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E)%3CBR%20%2F%3Egui_mainfcn(gui_State%2C%20varargin%7B%3A%7D)%3B%3CBR%20%2F%3E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%5E%3CBR%20%2F%3EError%20in%20%3C%2FSPAN%3E%3CA%20target%3D%22_blank%22%20rel%3D%22noopener%22%3E%3CSPAN%3Ematlab.graphics.internal.figfile.FigFile%2Fread%26gt%3B%40(hObject%2Ceventdata)NXP_Support_Package_S32K1xx('OpenToolbox_Callback'%2ChObject%2Ceventdata%2Cguidata(hObject))%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3EError%20using%20%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3Amatlab.lang.internal.introspective.errorDocCallback('matlab.ui.internal.controller.uicontrol.UIControlController%2FtriggerActionEvent'%2C%20'C%3A%5CProgram%20Files%5CMATLAB%5CR2025a%5Ctoolbox%5Cmatlab%5Cuicomponents%5Cuicontrol%5C%2Bmatlab%5C%2Bui%5C%2Binternal%5C%2Bcontroller%5C%2Buicontrol%5CUIControlController.m'%2C%2076)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Ematlab.ui.internal.controller.uicontrol.UIControlController%2FtriggerActionEvent%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E%20(%3C%2FSPAN%3E%3CA%20href%3D%22matlab%3A%20opentoline('C%3A%5CProgram%20Files%5CMATLAB%5CR2025a%5Ctoolbox%5Cmatlab%5Cuicomponents%5Cuicontrol%5C%2Bmatlab%5C%2Bui%5C%2Binternal%5C%2Bcontroller%5C%2Buicontrol%5CUIControlController.m'%2C76%2C0)%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3E%3CSPAN%3Eline%2076%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%3E)%3CBR%20%2F%3EError%20while%20evaluating%20UIControl%20Callback.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2138660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Model%20based%20design%20installtion%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2138660%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Jerry%2C%3C%2FP%3E%3CP%3EI%20just%20had%20the%20same%20problem.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20NXP_Support_Package_S32K3xx.m%2C%20replace%20these%20lines%20%3A%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3Eresult(i)%20%3D%20contains(toolboxes(i).Name%2C%20'NXP_MBDToolbox_S32K3xx')%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3E%3CSPAN%3Ewith%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3Eif%20isempty(toolboxes(i).Name)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3Eelse%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3Eresult(i)%20%3D%20contains(toolboxes(i).Name%2C%20'NXP_MBDToolbox_S32K3xx')%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%3Eend%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3EIn%20my%20case%2C%20it%20seems%20like%20the%20toolboxes%20variable%20had%20an%20empty%20member%2C%20which%20caused%20the%20error.%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AlexCloutierDyname_0-1753212718436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22AlexCloutierDyname_0-1753212718436.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F348887i6121C39B02A805D5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22AlexCloutierDyname_0-1753212718436.png%22%20alt%3D%22AlexCloutierDyname_0-1753212718436.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CP%3EYou%20need%20to%20do%20this%20replacement%20three%20times%20in%20the%20.m.%3C%2FP%3E%3CP%3EHope%20this%20helps%2C%3C%2FP%3E%3CP%3EAlex%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131633%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Model%20based%20design%20installtion%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131633%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESo%20how%20to%20solve%20it%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2131631%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Model%20based%20design%20installtion%20problem%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2131631%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EThe%20key%20error%20here%20is%3A%3C%2FP%3E%3CP%3EError%20using%20contains%3CBR%20%2F%3EFirst%20argument%20must%20be%20text.%3CBR%20%2F%3EThis%20means%20the%20variable%20toolboxes(i).Name%20passed%20to%20contains%20is%20not%20a%20string%20or%20char%20array%2C%20which%20it%20must%20be.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EBest%20Regard%2C%3C%2FP%3E%3CP%3ETim%3C%2FP%3E%3C%2FLINGO-BODY%3E