Answered

Which options to tick & un-tick during MEX generations for faster execution during run?

There is a MATLAB Coder documentation setting covering <https://www.mathworks.com/help/coder/matlab-algorithm-acceleration.html ...

Which options to tick & un-tick during MEX generations for faster execution during run?

There is a MATLAB Coder documentation setting covering <https://www.mathworks.com/help/coder/matlab-algorithm-acceleration.html ...

plus d'un an ago | 0

| accepted

Answered

Change format in created C code

The Coder configuration settings |IndentSize| and |IndentStyle| will let you achieve the changes you want: <https://www.mathw...

Change format in created C code

The Coder configuration settings |IndentSize| and |IndentStyle| will let you achieve the changes you want: <https://www.mathw...

plus d'un an ago | 0

| accepted

Answered

How to fix "Failed to generate all binary outputs"

It looks like things are getting confused because of the spaces in the path: -IC:/Users/Dell/DOCUME~1/MATLAB/Add-Ons/Collec...

How to fix "Failed to generate all binary outputs"

It looks like things are getting confused because of the spaces in the path: -IC:/Users/Dell/DOCUME~1/MATLAB/Add-Ons/Collec...

plus d'un an ago | 1

| accepted

Answered

How to display the generated code in one line?

This is a similar question to: <https://www.mathworks.com/matlabcentral/answers/391533-is-there-a-way-to-disable-line-wrappin...

How to display the generated code in one line?

This is a similar question to: <https://www.mathworks.com/matlabcentral/answers/391533-is-there-a-way-to-disable-line-wrappin...

plus d'un an ago | 1

| accepted

Answered

Ho to use a dynamic array in a MEX file function

Update your code: function y = bimifunc(poly2, polysz2) %#codegen %coder.updateBuildInfo('addSourceFiles','bm.c'); y...

Ho to use a dynamic array in a MEX file function

Update your code: function y = bimifunc(poly2, polysz2) %#codegen %coder.updateBuildInfo('addSourceFiles','bm.c'); y...

plus d'un an ago | 1

| accepted

Answered

AVX & SSE options not available for Coder/Code replacement library

As of R2018a, generating code that leverages AVX instructions requires Embedded Coder to be installed and licensed.

AVX & SSE options not available for Coder/Code replacement library

As of R2018a, generating code that leverages AVX instructions requires Embedded Coder to be installed and licensed.

plus d'un an ago | 0

| accepted

Answered

How can I deploy a 'SeriesNetwork' into C/C++ Code?

Deploying these networks with MATLAB Coder is currently not supported (as of MATLAB R2018a when I write this). A workaround i...

How can I deploy a 'SeriesNetwork' into C/C++ Code?

Deploying these networks with MATLAB Coder is currently not supported (as of MATLAB R2018a when I write this). A workaround i...

presque 2 ans ago | 0

Answered

matlab coder mex faster than exe?

It definitely makes sense that MEX could be faster. When generating MEX code, Coder has access to the high-performance libraries...

matlab coder mex faster than exe?

It definitely makes sense that MEX could be faster. When generating MEX code, Coder has access to the high-performance libraries...

presque 2 ans ago | 0

Answered

MEX Generation with Coder: Link FFTW?

*Edit April 11, 2018* As of MATLAB R2017b MATLAB Coder supports generating FFTW calls from the base MATLAB functions |fft,fft2,f...

MEX Generation with Coder: Link FFTW?

*Edit April 11, 2018* As of MATLAB R2017b MATLAB Coder supports generating FFTW calls from the base MATLAB functions |fft,fft2,f...

presque 2 ans ago | 0

| accepted

Answered

Allow arbitrarily sized inputs for codegen without infinite bounds on array size

Using |Inf| is the standard way to specify unbounded array sizes for Coder. You can use that with assert or with varsize: |coder...

Allow arbitrarily sized inputs for codegen without infinite bounds on array size

Using |Inf| is the standard way to specify unbounded array sizes for Coder. You can use that with assert or with varsize: |coder...

environ 2 ans ago | 0

| accepted

Answered

Error by using function imclose() and implementation of MATLAB code into Simulink model

*Copied from a comment* The error is likely prefixed by a statement like "Simulink was unable to determine ..." something abo...

Error by using function imclose() and implementation of MATLAB code into Simulink model

*Copied from a comment* The error is likely prefixed by a statement like "Simulink was unable to determine ..." something abo...

environ 2 ans ago | 0

| accepted

Answered

How do I correctly compile MATLAB-generated C/C++ code on macOS High Sierra (10.13.3)?

The error that |_main| is missing means that you're trying to compile an executable and no |main| function was specified. You ca...

How do I correctly compile MATLAB-generated C/C++ code on macOS High Sierra (10.13.3)?

The error that |_main| is missing means that you're trying to compile an executable and no |main| function was specified. You ca...

environ 2 ans ago | 0

| accepted

Answered

error C2440 While using MATLAB Coder with Custom FFT library callback

This is a bug and has been reported to the MATLAB Coder development team. Thank you for reporting it. As you've seen, generat...

error C2440 While using MATLAB Coder with Custom FFT library callback

This is a bug and has been reported to the MATLAB Coder development team. Thank you for reporting it. As you've seen, generat...

plus de 2 ans ago | 0

| accepted

Answered

Converting Matlab function to mex with user defined class object

*Edit:* As of MATLAB R2017a value objects can be inputs and outputs from MEX files. In earlier releases, MATLAB Coder does no...

Converting Matlab function to mex with user defined class object

*Edit:* As of MATLAB R2017a value objects can be inputs and outputs from MEX files. In earlier releases, MATLAB Coder does no...

plus de 2 ans ago | 0

| accepted

Answered

Can anonymous function handles be inputs of functions that are turned into C code using MATLAB Coder (codegen)?

This is not supported. When running the MEX file, Coder typically needs to have generated code for the function handle |f| may r...

Can anonymous function handles be inputs of functions that are turned into C code using MATLAB Coder (codegen)?

This is not supported. When running the MEX file, Coder typically needs to have generated code for the function handle |f| may r...

plus de 2 ans ago | 0

| accepted

Answered

N(N-1)/2 distances from a d*N matrix of column vectors (5000<N<50000)

(1) Estimating speedup is very difficult because it depends on so many factors. Here's some of the documentation Coder provides ...

N(N-1)/2 distances from a d*N matrix of column vectors (5000<N<50000)

(1) Estimating speedup is very difficult because it depends on so many factors. Here's some of the documentation Coder provides ...

plus de 2 ans ago | 0

Answered

Please explain Coder run-time errors

|wrapTo2Pi_mex(4.3)| is the right syntax to pass a double precision number to |wrapTo2Pi_mex|. The code |wrapTo2Pi_mex 4.3| pass...

Please explain Coder run-time errors

|wrapTo2Pi_mex(4.3)| is the right syntax to pass a double precision number to |wrapTo2Pi_mex|. The code |wrapTo2Pi_mex 4.3| pass...

plus de 2 ans ago | 0

| accepted

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...

presque 3 ans 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...

presque 3 ans 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 ...

presque 3 ans 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...

environ 3 ans 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...

environ 3 ans 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...

environ 3 ans 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...

environ 3 ans 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 ...

environ 3 ans ago | 1

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...

environ 3 ans 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...

plus de 3 ans 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...

plus de 3 ans 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...

plus de 3 ans 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]; ...

plus de 3 ans ago | 2