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)
Mostra commenti meno recenti
MathWorks Support Team
il 2 Nov 2009
Modificato: MathWorks Support Team
il 7 Feb 2017
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
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.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su MATLAB Compiler in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!