Are there any alternatives to try/catch statements that are supported by code generation?
I am trying to prepare an application (prepared in App Designer and connected to a Simulink model) to be packaged as a standalone executable.
My Simulink model is fairly simple: using Interpreted MATLAB function blocks as input and output to an s-function block (which is connected to a much larger and complicated external model).
In order to create a standalone executable for an application connected to a Simulink model, I found that I have to use Simulink Compiler, which does not support Interpreted MATLAB functions, so I am trying to convert their functionality to MATLAB function blocks.
As it turns out, MATLAB function blocks are further subject to code generation limitations, which exclude try/catch statements. These try/catch statements are primarily used to catch and pass error code or correct user input with instructions, which is a core functionality of deploying a proprietary application in industry.
Therefore, I was wondering if there are any alternatives to try/catch statements that are supported by code generation? I could not find any simple fix in the documentation. Are there any options besides coding in more input validation?
Thanks!I am trying to prepare an application (prepared in App Designer and connected to a Simulink model) to be packaged as a standalone executable.
My Simulink model is fairly simple: using Interpreted MATLAB function blocks as input and output to an s-function block (which is connected to a much larger and complicated external model).
In order to create a standalone executable for an application connected to a Simulink model, I found that I have to use Simulink Compiler, which does not support Interpreted MATLAB functions, so I am trying to convert their functionality to MATLAB function blocks.
As it turns out, MATLAB function blocks are further subject to code generation limitations, which exclude try/catch statements. These try/catch statements are primarily used to catch and pass error code or correct user input with instructions, which is a core functionality of deploying a proprietary application in industry.
Therefore, I was wondering if there are any alternatives to try/catch statements that are supported by code generation? I could not find any simple fix in the documentation. Are there any options besides coding in more input validation?
Thanks! I am trying to prepare an application (prepared in App Designer and connected to a Simulink model) to be packaged as a standalone executable.
My Simulink model is fairly simple: using Interpreted MATLAB function blocks as input and output to an s-function block (which is connected to a much larger and complicated external model).
In order to create a standalone executable for an application connected to a Simulink model, I found that I have to use Simulink Compiler, which does not support Interpreted MATLAB functions, so I am trying to convert their functionality to MATLAB function blocks.
As it turns out, MATLAB function blocks are further subject to code generation limitations, which exclude try/catch statements. These try/catch statements are primarily used to catch and pass error code or correct user input with instructions, which is a core functionality of deploying a proprietary application in industry.
Therefore, I was wondering if there are any alternatives to try/catch statements that are supported by code generation? I could not find any simple fix in the documentation. Are there any options besides coding in more input validation?
Thanks! code generation, simulink, simulink compiler MATLAB Answers — New Questions