Borrar filtros
Borrar filtros

How to import MATLAB code with GUI into the SIMULINK?

3 visualizaciones (últimos 30 días)
Ehsan na
Ehsan na el 19 de Nov. de 2014
Dears,
I have done a software in Matlab. It has many modules as m-file functions, with GUI created in GUIDE. The code imports some image files and does various processing on them.
Now, I'd like to make each module (m-file function that I wrote) as a simulink block, so that I will be able to drag-drop various modules depending on the input images.
My question is if I can simply import my m-files functions into the simulink and create Simulink blocks? Or do I need to re-write them and do lots of modifications?
So far, I tried to create a simulink model, discrete solver mode (fixed step), only one time step, when I put my code in the matlab function block of simulink, I get many errors, specifically Simulink generates error for the GUI files. such as: - "Simulink does not have enough information to determine output sizes for this block" (I guess because of the varargout and varargin).
- "Function handles in structures are not supported." ( for gui_State struct).
and other errors such as: "The function 'strcat' is not supported for standalone code generation."
Any help regarding moving the matlab m function codes intro Simulink, is highly appreciated.
(p.s. I am using Matlab 2014a)

Respuestas (0)

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by