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 visualizzazione (ultimi 30 giorni)
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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 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.

Più risposte (0)

Categorie

Scopri di più su MATLAB Compiler in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti


Release

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by