How can I utilize the MATLAB Compiler Runtime (MCR) User Data Interface to pass values between the MATLAB code and the wrapper code while using the MATLAB Compiler 4.10 (R2009a)?

1 Ansicht (letzte 30 Tage)
In the MATLAB Compiler 4.10 (R2009a) help file, there is a section that is entitled "Improving Data Access Using the MCR User Data Interface." It would be helpful to include an example on how to use this.
https://in.mathworks.com/help/releases/R2009a/toolbox/compiler/br2jauc-31.html#br2jauc-41
You may access the same page locally by typing the following at the MATLAB R2009a prompt:
web([docroot,'/toolbox/compiler/br2jauc-31.html#br2jauc-41'])
Specifically, I wish to define a structure in MATLAB and pass that information into C-code.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 7 Feb. 2017
The concept is illustrated using an example. For this, download the four attached files: compileRun.m, magicdriver.c, structTest_init.m, structTest2.m.
Steps:
1. Open compileRun.m
2. This file creates a shared library using the MATLAB files, compiles the driver program, and then runs the executable which shares a structure data created in MATLAB with the driver in C.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Produkte


Version

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by