Answered

Matlab Coder: No rule to make target c_mexapi_version.o

*Edit* A bug report: <https://www.mathworks.com/support/bugreports/1552846> has been published for this issue that incl...

Matlab Coder: No rule to make target c_mexapi_version.o

*Edit* A bug report: <https://www.mathworks.com/support/bugreports/1552846> has been published for this issue that incl...

meer dan 5 jaar ago | 2

| accepted

Answered

How to prevent Matlab Coder from declaring locals as statics?

You can enable the |MultiInstanceCode| configuration setting: <http://www.mathworks.com/help/coder/ug/generate-reentrant-code...

How to prevent Matlab Coder from declaring locals as statics?

You can enable the |MultiInstanceCode| configuration setting: <http://www.mathworks.com/help/coder/ug/generate-reentrant-code...

meer dan 5 jaar ago | 1

| accepted

Answered

Turn off rt_roundd inserted function

You can use a Code Replacement library and define a function replacement for the round function. The library says map function ...

Turn off rt_roundd inserted function

You can use a Code Replacement library and define a function replacement for the round function. The library says map function ...

meer dan 5 jaar ago | 0

Answered

Parameterize function without anonymous or nested functions

If you're able to upgrade, anonymous function support was added to MATLAB Coder in MATLAB R2016b: <http://www.mathworks.com/h...

Parameterize function without anonymous or nested functions

If you're able to upgrade, anonymous function support was added to MATLAB Coder in MATLAB R2016b: <http://www.mathworks.com/h...

meer dan 5 jaar ago | 0

Answered

No supported MEX compiler, but codegen executes successfully

As it says here: <http://www.mathworks.com/help/coder/release-notes.html?searchHighlight=lcc&s_tid=doc_srchtitle> MATLAB C...

No supported MEX compiler, but codegen executes successfully

As it says here: <http://www.mathworks.com/help/coder/release-notes.html?searchHighlight=lcc&s_tid=doc_srchtitle> MATLAB C...

meer dan 5 jaar ago | 0

Answered

Include library path in MATLAB coder

You can use |coder.updateBuildInfo| to do that: <http://www.mathworks.com/help/coder/ref/coder.updatebuildinfo.html#bt086fw-1...

Include library path in MATLAB coder

You can use |coder.updateBuildInfo| to do that: <http://www.mathworks.com/help/coder/ref/coder.updatebuildinfo.html#bt086fw-1...

meer dan 5 jaar ago | 0

| accepted

Answered

Matlab Coder: dll with several external functions for singletone class

This assumes your class is a handle class so you can access the same instance. You can use a persistent variable in a |getSet...

Matlab Coder: dll with several external functions for singletone class

This assumes your class is a handle class so you can access the same instance. You can use a persistent variable in a |getSet...

meer dan 5 jaar ago | 0

Answered

How to disable openMP with Matlab Coder?

Try: cfg = coder.config('dll'); cfg.EnableOpenMP = false; codegen -config cfg ...

How to disable openMP with Matlab Coder?

Try: cfg = coder.config('dll'); cfg.EnableOpenMP = false; codegen -config cfg ...

bijna 6 jaar ago | 3

Answered

How to call extrisic m-file contains function handle in SIMULINK user-defined MATLAB function?

You can see the explanation of this here: <https://www.mathworks.com/help/simulink/ug/calling-matlab-functions.html#bq1h2z9-4...

How to call extrisic m-file contains function handle in SIMULINK user-defined MATLAB function?

You can see the explanation of this here: <https://www.mathworks.com/help/simulink/ug/calling-matlab-functions.html#bq1h2z9-4...

bijna 6 jaar ago | 0

Answered

createOptimProblem run etc is not supported for CodeGen - is there an equivalent that is?

For the optimization functions that are supported for code generation: <http://www.mathworks.com/help/coder/ug/functions-supp...

createOptimProblem run etc is not supported for CodeGen - is there an equivalent that is?

For the optimization functions that are supported for code generation: <http://www.mathworks.com/help/coder/ug/functions-supp...

bijna 6 jaar ago | 0

Answered

identical code works fine in matlab 2015b but not in matlab 2016b

A MATLAB bug report has been published for this issue: <https://www.mathworks.com/support/bugreports/1492995> which contai...

identical code works fine in matlab 2015b but not in matlab 2016b

A MATLAB bug report has been published for this issue: <https://www.mathworks.com/support/bugreports/1492995> which contai...

ongeveer 6 jaar ago | 0

Answered

How can I use a coder.opaque value in a Matlab expression with codegen?

Note that as of MATLAB R2013a |fopen, fclose, and fprintf| are supported for codegen. Other file I/O functions have been added m...

How can I use a coder.opaque value in a Matlab expression with codegen?

Note that as of MATLAB R2013a |fopen, fclose, and fprintf| are supported for codegen. Other file I/O functions have been added m...

ongeveer 6 jaar ago | 1

| accepted

Answered

Concatenate two strings in Matlab coder

If you have strings in MATLAB, then just concatenate them in MATLAB: str1 = 'foo'; str2 = 'bar'; str3 = [str1 str2]; ...

Concatenate two strings in Matlab coder

If you have strings in MATLAB, then just concatenate them in MATLAB: str1 = 'foo'; str2 = 'bar'; str3 = [str1 str2]; ...

ongeveer 6 jaar ago | 3

Answered

Error linking Matlab generated C-code: start.S:114: undefined reference to `main' collect2

To build an executable you need to <http://www.mathworks.com/help/coder/ug/standalone-c-c-executables-from-matlab-code.html#bsx_...

Error linking Matlab generated C-code: start.S:114: undefined reference to `main' collect2

To build an executable you need to <http://www.mathworks.com/help/coder/ug/standalone-c-c-executables-from-matlab-code.html#bsx_...

meer dan 6 jaar ago | 0

| accepted

Answered

how use fzero with matlab coder and a function with parameters ?

The typical workaround is to model an anonymous function using a sub-function with persistent variables to store the extra param...

how use fzero with matlab coder and a function with parameters ?

The typical workaround is to model an anonymous function using a sub-function with persistent variables to store the extra param...

meer dan 6 jaar ago | 0

Answered

codegen: Do I need to include the source generated under the "interface" directory when building a library on a different platform?

You don't need to include the code in the |interface| folder. That code is used for things like Software-in-the-Loop (SIL) and P...

codegen: Do I need to include the source generated under the "interface" directory when building a library on a different platform?

You don't need to include the code in the |interface| folder. That code is used for things like Software-in-the-Loop (SIL) and P...

meer dan 6 jaar ago | 0

| accepted

Answered

C code not working inside MATLAB System

You likely need to add |coder.cinclude('triple.h')| in the System Object to include the header for triple. Without the declarati...

C code not working inside MATLAB System

You likely need to add |coder.cinclude('triple.h')| in the System Object to include the header for triple. Without the declarati...

meer dan 6 jaar ago | 0

| accepted

Answered

An error occurred when using matlab to call dll file which was generated by matlab coder

When generating code for an |Inf X Inf| array, Coder will produce a C or C++ function which takes a struct argument to account f...

An error occurred when using matlab to call dll file which was generated by matlab coder

When generating code for an |Inf X Inf| array, Coder will produce a C or C++ function which takes a struct argument to account f...

meer dan 6 jaar ago | 1

| accepted

Answered

Using imresize function for matlab coder

Code generation support was added for |imresize| in MATLAB R2015b: <http://www.mathworks.com/help/coder/release-notes.html#R2...

Using imresize function for matlab coder

Code generation support was added for |imresize| in MATLAB R2015b: <http://www.mathworks.com/help/coder/release-notes.html#R2...

bijna 7 jaar ago | 0

| accepted

Answered

Embed an external m file in a simulink m function

First, no need to have the |if true ... end| wrapping the whole file. Just omit that. Next, it is possible to use sub-functio...

Embed an external m file in a simulink m function

First, no need to have the |if true ... end| wrapping the whole file. Just omit that. Next, it is possible to use sub-functio...

bijna 7 jaar ago | 0

| accepted

Answered

Ode45 matlab coder function handle

You cannot pass a function handle directly to a MEX file generated by MATLAB Coder. Just write a wrapper that calls |ode45| in t...

Ode45 matlab coder function handle

You cannot pass a function handle directly to a MEX file generated by MATLAB Coder. Just write a wrapper that calls |ode45| in t...

bijna 7 jaar ago | 0

Answered

Is it possible to generate .o and .a files with Coder?

You can use: cfg = coder.config('lib'); codegen -config cfg ... to generate a static library for your current platfor...

Is it possible to generate .o and .a files with Coder?

You can use: cfg = coder.config('lib'); codegen -config cfg ... to generate a static library for your current platfor...

meer dan 7 jaar ago | 0

Answered

What do I need to include when I use a static C library from Coder?

The MATLAB Coder documentation has a <http://www.mathworks.com/help/coder/deployment.html deployment section> with many relevant...

What do I need to include when I use a static C library from Coder?

The MATLAB Coder documentation has a <http://www.mathworks.com/help/coder/deployment.html deployment section> with many relevant...

meer dan 7 jaar ago | 0

| accepted

Answered

How do i get the user's input in a MATLAB standalone executeable

This answer will be for the MATLAB Coder workflow. Similar to what Walter says, you could also |fread| the entire file into a...

How do i get the user's input in a MATLAB standalone executeable

This answer will be for the MATLAB Coder workflow. Similar to what Walter says, you could also |fread| the entire file into a...

meer dan 7 jaar ago | 3

Answered

Anonymous function alternative for MATLAB Coder?

For the general issue of replacing an anonymous function for code generation, see <http://www.mathworks.com/matlabcentral/answer...

Anonymous function alternative for MATLAB Coder?

For the general issue of replacing an anonymous function for code generation, see <http://www.mathworks.com/matlabcentral/answer...

meer dan 7 jaar ago | 0

Answered

Passing constant struct to entry point in Matlab Coder

Typically when you want to filter some code from code generation, the best approach is to use |coder.target|. In this case you c...

Passing constant struct to entry point in Matlab Coder

Typically when you want to filter some code from code generation, the best approach is to use |coder.target|. In this case you c...

meer dan 7 jaar ago | 1

| accepted

Answered

Ignoring Simulink blocks when generating code

This is a bug in MATLAB Coder when using file I/O with model reference (i.e. a model block) and either accelerator or rapid acce...

Ignoring Simulink blocks when generating code

This is a bug in MATLAB Coder when using file I/O with model reference (i.e. a model block) and either accelerator or rapid acce...

meer dan 7 jaar ago | 0

Answered

How can I set portable word sizes for the MATLAB Coder?

MATLAB Coder does not have support for portable word sizes. Unfortunately this message is misleading in that regard and has been...

How can I set portable word sizes for the MATLAB Coder?

MATLAB Coder does not have support for portable word sizes. Unfortunately this message is misleading in that regard and has been...

meer dan 7 jaar ago | 0

| accepted

Answered

error in embedded matlab function

Since you've declared |radtodeg| as an extrinsic, its output needs to be <http://www.mathworks.com/help/fixedpoint/ug/calling-ma...

error in embedded matlab function

Since you've declared |radtodeg| as an extrinsic, its output needs to be <http://www.mathworks.com/help/fixedpoint/ug/calling-ma...

meer dan 7 jaar ago | 0

Answered

Using an S-function to access a mat-file and load data to array

I assume that the values to be stored in the hypothetical MAT files would not change after generating code, is that correct? ...

Using an S-function to access a mat-file and load data to array

I assume that the values to be stored in the hypothetical MAT files would not change after generating code, is that correct? ...

meer dan 7 jaar ago | 0