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 (최근 30일)
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.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2017년 2월 7일
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개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by