how to generate MATLAB code from Simulink model
古いコメントを表示
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 件のコメント
Kevin Chng
2018 年 10 月 26 日
編集済み: Kevin Chng
2018 年 10 月 26 日
How about direct use sim() to run your model in your App Designer script?
Naman Chaturvedi
2018 年 10 月 29 日
You can do what Kevin suggested and then generate the executable file. Are you facing any issues in doing so?
Keymand Kiani
2018 年 10 月 30 日
Kevin Chng
2018 年 10 月 31 日
you generate MATLAB Code from Simulink?
Amare
2024 年 6 月 29 日
編集済み: Walter Roberson
2024 年 6 月 30 日
: Begin by implementing a convolutional encoder
in Simulink. The convolutional encoder takes the input message bits
and produces a stream of encoded bits. The encoder consists of shift
registers and exclusive-OR (XOR) gates.
Amare
2024 年 6 月 29 日
give mathalba code for abouv question
Walter Roberson
2024 年 6 月 30 日
- That looks like a Doit4Me
- It is confusing whether the work is to be done in Simulink or in MATLAB
回答 (5 件)
Eric Sargent
2020 年 12 月 9 日
編集済み: Eric Sargent
2020 年 12 月 9 日
1 投票
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
2018 年 10 月 31 日
編集済み: Walter Roberson
2024 年 6 月 30 日
0 投票
There is no support for what you are doing.
You can use Simulink Real Time Explorer, using instrument panels for user interaction.
2 件のコメント
Amare
2024 年 7 月 5 日
cheak it refuse to run
Walter Roberson
2024 年 7 月 5 日
It sounds like you do not have Simulink Real Time Explorer installed.
image = imread('jump.jpg'); % read image
% 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 件のコメント
Walter Roberson
2022 年 10 月 5 日
How does this answer the Question about compiling Simulink ?
EDMOND
2023 年 7 月 22 日
0 投票
How to convert binary code to gray code in matlab
1 件のコメント
Walter Roberson
2025 年 4 月 2 日
https://www.mathworks.com/help/comm/ug/symbol-mapping-examples.html shows how to use comm.PSKModulator for gray code.
For standaline functions to convert to gray code, check the File Exchange; there are several there.
sandeepnaik
2025 年 4 月 2 日
0 投票
samrt and sustainable agriculture
1 件のコメント
Walter Roberson
2025 年 4 月 2 日
Please expand on your answer. I do not understand how this answer solves problems with compiling Simulink code.
カテゴリ
ヘルプ センター および File Exchange で Simulink Coder についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!