how to generate MATLAB code from Simulink model

346 vues (au cours des 30 derniers jours)
Keymand Kiani
Keymand Kiani le 26 Oct 2018
Commenté : Walter Roberson le 5 Juil 2024
Hi, I have a relatively complex simulink model, from which a MATLAB code must be generated. I want to use the generated code in App designer to develop an app and finally compile the app using `Application Compiler`, so that it can be used on every system without having MATLAB installed. The process can be summed up as the following: Simulink --> MATLAB code (.m) --> App Designer --> Application compiler (.exe)
  7 commentaires
Amare
Amare le 29 Juin 2024
give mathalba code for abouv question
Walter Roberson
Walter Roberson le 30 Juin 2024
  1. That looks like a Doit4Me
  2. It is confusing whether the work is to be done in Simulink or in MATLAB

Connectez-vous pour commenter.

Réponses (4)

Eric Sargent
Eric Sargent le 9 Déc 2020
Modifié(e) : Eric Sargent le 9 Déc 2020
As of R2020a you can use Simulink Compiler to compile your model and use it with your deployed / compiled App Designer app.
More information about Simulink Compiler can be found here:

Walter Roberson
Walter Roberson le 31 Oct 2018
Modifié(e) : Walter Roberson le 30 Juin 2024
There is no support for what you are doing.
You can use Simulink Real Time Explorer, using instrument panels for user interaction.
  2 commentaires
Amare
Amare le 5 Juil 2024
cheak it refuse to run
Walter Roberson
Walter Roberson le 5 Juil 2024
It sounds like you do not have Simulink Real Time Explorer installed.

Connectez-vous pour commenter.


puli
puli le 5 Oct 2022
Modifié(e) : Walter Roberson le 5 Oct 2022
image = imread('jump.jpg'); % read image
Error using imread>get_full_filename
File "jump.jpg" does not exist.

Error in imread (line 372)
fullname = get_full_filename(filename);
% get image dimensions: an RGB image has three planes
% reshaping puts the RGB layers next to each other generating
% a two dimensional grayscale image
[height, width, planes] = size(image);
rgb = reshape(image, height, width * planes);
imagesc(rgb); % visualize RGB planes
colorbar on % display colorbar
r = image(:, :, 1); % red channel
g = image(:, :, 2); % green channel
b = image(:, :, 3); % blue channel
The result is:
  1 commentaire
Walter Roberson
Walter Roberson le 5 Oct 2022
How does this answer the Question about compiling Simulink ?

Connectez-vous pour commenter.


EDMOND
EDMOND le 22 Juil 2023
How to convert binary code to gray code in matlab

Catégories

En savoir plus sur Communications Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by