Answered
Matlab Coder and fminsearch: what implementation strategy?
One workaround is to model the anonymous function's parameters using a sub-function and persistent variables. The idea is to mak...

9 years ago | 2

| accepted

Answered
MATLAB Coder - Best practice for using lists
MATLAB Coder does not currently generate C++ code that utilizes the STL data structures. You can view the mapping between MATLAB...

9 years ago | 0

Answered
MATLAB expression 'Mf' is not of the correct sparseness...
I'll give the same answer as on StackOverflow: <http://stackoverflow.com/questions/26605567/matlab-expression-mf-is-not-of-th...

9 years ago | 0

| accepted

Answered
MATLAB seg fault during codegen
If you are seeing a seg fault during code generation, the recommended action is to contact technical support: <http://www.mat...

9 years ago | 0

| accepted

Answered
Matlab 2014a mex build fail with Openmp
There is an apparent difference on Ubuntu with linking OpenMP where the flag |-fopenmp| needs to be manually added to the build ...

9 years ago | 0

| accepted

Answered
When I run this function, it gives the error "Data 'u_pr' (#427) is inferred as a variable size matrix, while its specified type is something else.". What is the solution for this problem? I will be happy for helps.
The variable |u_pr| is being declared as: u_pr = zeros(nu,Np+1); which means that it is variable size since its dimensio...

9 years ago | 0

| accepted

Answered
C-Code emxArray help
If you choose the target type to be a static library and click the build button you should be able to see how the library is cre...

9 years ago | 0

Answered
How declare a variable only once in a matlab function block and then use the previous value the nex time the function is used?
You could also use a <http://www.mathworks.com/help/matlab/ref/persistent.html persistent variable> inside your MATLAB function ...

10 years ago | 6

| accepted

Answered
MATLAB Coder "Style" Options when Generating .mex-File
Using |<http://www.mathworks.com/help/simulink/slref/coder.cstructname.html coder.cstructname>| is one means of integrating stru...

10 years ago | 2

| accepted

Answered
mat2str issue in an embedded MATLAB Function
The function |mat2str| returns a string in MATLAB. Following Mike's answer, the variable to which the output of |mat2str| is as...

10 years ago | 0

| accepted

Answered
Subscripting into an mxArray is not supported.
It appears that you are using an extrinsic function (declared with |coder.extrinsic|) to create |in|, correct? In that case you...

10 years ago | 1

| accepted

Answered
Question about using C library created by codegen in C program
Hi Jeff, I added the product MATLAB Coder to your question since this makes searching easier. The following is a duplicati...

10 years ago | 1

| accepted

Answered
simulink robot arm trajectory control
On each time step of the simulation, the entirety of the code in your MATLAB Function Block will execute to produce the output |...

10 years ago | 0

Answered
Which coder Toolbox are required to work with emlc function ?
Product dependencies change based upon the release however, you should only need MATLAB Coder to use the command |emlc|. It sho...

10 years ago | 1

| accepted

Answered
How Matlab coder converts image to unsigned char
The generated code stores the array in column-major order just like MATLAB: <http://www.mathworks.com/help/matlab/matlab_exte...

10 years ago | 0

| accepted

Answered
Why is the c/c++ code generated by MATLAB Coder not standalone, that is, depends on other library?
As dpb said, some functions from the Image Processing Toolbox leverage libraries to provide both functionality and performance. ...

10 years ago | 0

Answered
Matlab Coder: Avoiding that input variables are converted to constants
I assume that you are generating code for another function which calls |tinyplot|. Please correct me if I am wrong. If you wou...

10 years ago | 0

Answered
Using neural network in function block from Simulink
In the MATLAB Function Block global variables are linked to Data Store Memory blocks rather than the MATLAB workspace: <http:...

10 years ago | 3

Answered
Linking Fortran to Matlab-generated MEX files
If your goal is to generate a MEX function, then I would recommend just declaring your Fortran MEX function as an extrinsic func...

10 years ago | 0

| accepted

Answered
Can I use Matlab Coder generated Mex functions on another computer
Quoting <http://www.mathworks.com/help/coder/ug/running-mex-functions_btt6xf9.html the documentation>: To run a MEX function...

10 years ago | 0

| accepted

Answered
Generate code from 'pchip' function
Code generation support for |PCHIP| and other interpolation routines were added in R2014a if you are able to upgrade: <http:/...

10 years ago | 0

| accepted

Answered
Variable-Sized Output from MATLAB Function block
You should also set up the sizes in the Data Editor for the MATLAB Function Block as per: <http://www.mathworks.com/help/simu...

10 years ago | 4

| accepted

Answered
Is there an "isdeploy" function for matlab coder?
Yep, you can use |coder.target('MATLAB')|: <http://www.mathworks.com/help/coder/ref/coder.target.html> to detect if your c...

10 years ago | 1

Answered
Coder varsize "index exceeds dimensions"
There are some MATLAB idioms which are not supported for code generation. Many such limitations are in the interest of preservi...

10 years ago | 1

| accepted

Answered
Port MATLAB .m code to Objective C++
MATLAB Coder generates C or C++ code from a supported subset of the MATLAB language: <http://www.mathworks.com/help/coder/lan...

10 years ago | 2

| accepted

Answered
Convert Mathlab to c/c++ convert issue
Can you try: mex -setup rather than |mbuild|? The command |mbuild| is for MATLAB Compiler rather than MATLAB Coder.

10 years ago | 0

Answered
what is difference between C static library and executables generated from matlab code using matlab coder?
You would likely want to generate a static library if you intend to utilize your generated code as a piece of a larger applicati...

10 years ago | 1

Answered
C compiler error in using quadprog in a simulink model using coder.extrinsic.
The MATLAB Function Block requires a supported C compiler even for simulation: <http://www.mathworks.com/help/simulink/ug/cre...

10 years ago | 0

| accepted

Answered
is the "qammod" function in communication toolbox not compatible with hdl coder in version R2013a?
I'm not certain of your needs but the System Object |comm.RectangularModulator| is supported for HDL Coder: <http://www.mathw...

10 years ago | 0

Answered
Propose Fixed-Point Data Types Using an Instrumented Mex Function
My first suggestion is if you are using R2014a, then |imfilter| is supported for code generation so you may be able to avoid dec...

10 years ago | 1

Load more