MATLAB Answers

0

Matlab Function in Simulink cannot be deployed to Arduino

Latest activity Answered by Meeshawn Marathe on 17 Oct 2017
I have a simulink model which contains a Matlab Funtion inside, when i try to deploy it to arduino i get an error like:
Nested functions are not supported.
Function 'arduino.m' (#44.43600.43622), line 1026, column 22:
"validateBoardPortMatch"
Launch diagnostic report.
Component:MATLAB Function | Category:CodererrorOpen
Errors occurred during parsing of MATLAB function 'MATLAB Function'
Component:MATLAB Function | Category:Codererror
Errors occurred during parsing of MATLAB function 'MATLAB Function'
Component:Simulink | Category:Blockerror
What should i do to fix this problem?

  0 Comments

Sign in to comment.

2 Answers

Answer by Bruno Marin on 27 Sep 2017

I have this problem too...

  0 Comments

Sign in to comment.


Answer by Meeshawn Marathe on 17 Oct 2017

Which release of MATLAB are you using? The latest version of MATLAB supports code generation for nested functions with some limitations. Please go through this link for more information. Additionally, go through this link for determining whether your function is suitable for code generation.
You could also try using 'level-2 MATLAB S-Function'. You can find more info on this here .

  0 Comments

Sign in to comment.