Answered

Error in generating code with custom FFT library in Matlab Coder

This is a bug in the generated code: https://www.mathworks.com/support/bugreports/1709696 As shown in the bug report, it was f...

Error in generating code with custom FFT library in Matlab Coder

This is a bug in the generated code: https://www.mathworks.com/support/bugreports/1709696 As shown in the bug report, it was f...

4 years ago | 0

| accepted

Answered

Using hetrogenous cells for code generation

You can do this assuming that |nParams| is a compile-time constant. For example: codegen cellExample -args coder.Constant(4...

Using hetrogenous cells for code generation

You can do this assuming that |nParams| is a compile-time constant. For example: codegen cellExample -args coder.Constant(4...

4 years ago | 0

Submitted

coder-swig

Examples showing how to use SWIG to wrap MATLAB Coder generated C and C++ code for other languages

4 years ago | 2 downloads |

Answered

How to debug generated mex codes

*Moved from comment* To debug generated MEX code, just pass the -g option to codegen and that will compile a debug MEX file. You...

How to debug generated mex codes

*Moved from comment* To debug generated MEX code, just pass the -g option to codegen and that will compile a debug MEX file. You...

4 years ago | 0

| accepted

Answered

Parallel Computation of Covariance and C Code Generation

*Update* Starting in R2018b you can generate code that calls a CBLAS as well as an LAPACK library: <https://www.mathworks.com...

Parallel Computation of Covariance and C Code Generation

*Update* Starting in R2018b you can generate code that calls a CBLAS as well as an LAPACK library: <https://www.mathworks.com...

4 years ago | 3

Answered

How to debug generated mex codes

It sounds like you are generating MEX code. MEX code assumes that MATLAB is present and as a result it may have a large number o...

How to debug generated mex codes

It sounds like you are generating MEX code. MEX code assumes that MATLAB is present and as a result it may have a large number o...

4 years ago | 0

Answered

Can matlab coder generate code that uses a specified external uBLAS linear algebra library included with BOOST?

*Update* Starting in R2018b you can generate code that calls a CBLAS as well as an LAPACK library: <https://www.mathworks.co...

Can matlab coder generate code that uses a specified external uBLAS linear algebra library included with BOOST?

*Update* Starting in R2018b you can generate code that calls a CBLAS as well as an LAPACK library: <https://www.mathworks.co...

4 years ago | 1

| accepted

Answered

why is mex parfor slower them mex for?

When I try your example on Linux (Debian 9) using GCC I see a good speedup with |parfor| in generated MEX: for : time = ...

why is mex parfor slower them mex for?

When I try your example on Linux (Debian 9) using GCC I see a good speedup with |parfor| in generated MEX: for : time = ...

4 years ago | 1

| accepted

Answered

Why the same function is taking more time after MEX creation?

The MATLAB Coder documentation has a section covering acclerating MATLAB code via MEX generation: <https://www.mathworks.com/...

Why the same function is taking more time after MEX creation?

The MATLAB Coder documentation has a section covering acclerating MATLAB code via MEX generation: <https://www.mathworks.com/...

4 years ago | 0

| accepted

Answered

This structure does not have a field 'rbm'; new fields cannot be added when structure has been read or used. #MATLAB Coder

MATLAB Coder support for cell arrays inside of structures was added in MATLAB R2017b: <https://www.mathworks.com/help/coder/r...

This structure does not have a field 'rbm'; new fields cannot be added when structure has been read or used. #MATLAB Coder

MATLAB Coder support for cell arrays inside of structures was added in MATLAB R2017b: <https://www.mathworks.com/help/coder/r...

4 years ago | 0

Answered

Makefile a matlab .m file

One option is to deploy your code using either MATLAB Compiler or MATLAB Coder. There's an overview of those two processes here:...

Makefile a matlab .m file

One option is to deploy your code using either MATLAB Compiler or MATLAB Coder. There's an overview of those two processes here:...

4 years ago | 0

Answered

fscanf/Pointing to a file in MATLAB Coder?

Check out the example: <https://www.mathworks.com/help/coder/examples/read-a-text-file.html?searchHighlight=coderdemo_readfil...

fscanf/Pointing to a file in MATLAB Coder?

Check out the example: <https://www.mathworks.com/help/coder/examples/read-a-text-file.html?searchHighlight=coderdemo_readfil...

4 years ago | 0

Answered

How to load microsoft access table shortcuts that is compatible with Matlab Coder

There's no explicit MATLAB Coder support for loading these types of files. Are you trying to generate MEX code to speed up your ...

How to load microsoft access table shortcuts that is compatible with Matlab Coder

There's no explicit MATLAB Coder support for loading these types of files. Are you trying to generate MEX code to speed up your ...

4 years ago | 0

Answered

about coder used handles.axes

Graphing and plotting functions are generally not supported for code generation with MATLAB Coder. If you can elaborate on why y...

about coder used handles.axes

Graphing and plotting functions are generally not supported for code generation with MATLAB Coder. If you can elaborate on why y...

4 years ago | 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

5 years ago | 0