Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
879 views

Using matlab coder, I get Subscripting into an mxArray is not supported. error in the following function: function net = mlpunpak(net, w) % Check arguments for consistency errstring = consist(net, '...
Ali Jooya's user avatar
1 vote
0 answers
256 views

I am trying to generate a mex file from my code using matlab's coder. I'm using interp2. Only when running the mex file I get an error "Grid values must be strictly increasing." It seems that the grid ...
Nan's user avatar
  • 41
0 votes
1 answer
684 views

I am trying to use Matlab Coder generated C code on Qt Creator. However, whenever I try to build my project, I get an undefined reference error. Here are some details about the setup: I set the ...
renzbagaporo's user avatar
1 vote
2 answers
1k views

I am working on a matlab project where I add effects to audio files (mp3, wav). Therefore, I load the files into arrays using the matlab function audioread(..). Now, I want to export this to Android. ...
Xema's user avatar
  • 1,886
0 votes
1 answer
5k views

I am trying to generate C code with the MATLAB Coder. The input to the function is an image that has been processed by imread within MATLAB. Since the output should be an m x n x 3 array from imread, ...
SDG's user avatar
  • 2,342
2 votes
1 answer
1k views

As you may know, extrinsic functions are not outputted during the code generation process. Are there alternatives to these functions and/or solutions to this problem? My code generation error report ...
SDG's user avatar
  • 2,342
1 vote
1 answer
911 views

I'm trying to convert my image processing code on MATLAB into C by using MATLAB coder. using imread needs a coder.entrinsic declaration. However, this means that the output to imread will be an ...
SDG's user avatar
  • 2,342
3 votes
2 answers
3k views

I am trying to run MATLAB Coder to transform a MATLAB .m file into .mex to hopefully run the code more quickly. When trying to build the file via MATLAB Coder engine, I get the following error: ...
user191919's user avatar
1 vote
1 answer
1k views

I'm using Matlab Coder to generate C/C++ codes from a matlab .m file, which calls external C/C++ functions. I did some work and found "code.ceval" made it worked. But it gets complicated when the .m ...
Cong Zhao's user avatar
0 votes
1 answer
618 views

This is with reference to a code suggested by Image Analyst given here. I am trying to generate C code for the algorithm. According to the document "Functions and Objects Supported for C and C++ Code ...
Saania's user avatar
  • 625
8 votes
1 answer
259 views

I am trying to use MATLAB Coder to convert code from Matlab to a MEX file. If I have a code snippet of the following form: x = zeros(a,1) x(a+1) = 1 then in Matlab this will resize the array to ...
Alex319's user avatar
  • 3,936
1 vote
1 answer
817 views

i'm trying to compile with Matlab Coder a custom function which includes a butterworth filter. I've extracted the lines that give me problem with the Matlab coder function. function [output] = ...
Matteo Maggioni's user avatar
0 votes
1 answer
638 views

I have a MATLAB code and its using a C++ code. When I try to build it using MATLAB Coder i am getting an error Undefined function or variable 'nameOfC++file'. How do I include / define it before ...
drinu16's user avatar
  • 795
1 vote
1 answer
699 views

I'm trying to conjure up a little parser that reads a .txt file containing parameters for an algorithm so i don't have to recompile it everytime i change a parameter. The application is C code ...
sobek's user avatar
  • 1,436
0 votes
0 answers
332 views

I recently got some of my Matlab code converted to C and it works. However, I would like to make some changes to these mex file and recompile. So far, I have only worked with simple mex project: ...
Garima Singh's user avatar
  • 1,490
0 votes
1 answer
2k views

I’m trying to pass a Structure from a Matlab function in Simulink to an external C++ function using the coder.ceval() and the coder.cstructname(). When I try to run the code on an Arduino Due board ...
user avatar
0 votes
0 answers
143 views

I have a matlab level-1 s-function that I use to solve a system of linear equations. Unfortunately, my simulations are very slow, and the Profiler Report tells me that this particular s-function is ...
user avatar
0 votes
1 answer
263 views

I'm writing a simulink device driver block for Arduino Due with the Matlab Function Approach as explained in the Simulink Device Driver guide. When I want to pass a double from the C++ code to the ...
user avatar
0 votes
1 answer
2k views

I'm trying to Include some Libraries, like metis in the custom code library section in Simulink. Do you know what type of libraries Simulink excepts? Must they have the ending .a, .o, .dll or lib? ...
hans's user avatar
  • 5
0 votes
1 answer
418 views

I'm trying to include Csparse from SuiteSparse in to Simulink. I've included the header ch.h and the directory of the c-functions in the custom code section. If I call the function cs_compress over ...
hans's user avatar
  • 5
0 votes
2 answers
3k views

I'm trying to give a structure to a C function in Simulink. My steps so far: Included the .h & .c in configuration parameters custom code. My header has a structure defind: typedef struct ...
hans's user avatar
  • 5
0 votes
1 answer
215 views

I have a query regarding Matlab Coder .I am developing a DLL from .m files using Matlab coder(R2014a).I need to fill the properties and details like copyright,file version,product name etc.. of the ...
Girish Kumar Chidananda's user avatar
1 vote
0 answers
681 views

I have a list of matrices. I want to use Matlab coder to get the corresponding c code and hence run the program faster. However, cell array is not supported in Matlab coder. Is there any other way to ...
MOON's user avatar
  • 2,871
0 votes
1 answer
117 views

I just ran a successful command to convert a MATLAB .m file to C source code >>codegen -c abc.m >> However I see the ">>" prompt again after command has finished (no errors, warnigs ...
Programmer's user avatar
  • 8,851
0 votes
2 answers
2k views

I have a struct with very large arrays in it. I use MATLAB coder to generate C code. In my generated code I wish to call some C function and pass by reference one of the arrays. For example: coder....
ThP's user avatar
  • 2,340
2 votes
1 answer
238 views

I created a dll of a simple function in Matlab using this command: mcc -t -L C -W lib:testfunctionLib -T link:lib testfunction.m libmmfile.mlib The simple function looks like: function y = ...
Drumsandspace's user avatar
0 votes
1 answer
3k views

I have a system with some embedded Matlab blocks where I'd like to perform some actions after a certain amount of time, in this case turn on lights and switches in an interface to which I send signals ...
user2703642's user avatar
1 vote
1 answer
510 views

I want to use Code generated from the Matlab C/C++ Coder in my C++ Code. Matlab creates the Files in the right way, and brings also a Makefile with it, to create a Library. I think, I linked the ...
Michael Filler's user avatar
0 votes
0 answers
233 views

Ok so I developed a code in MATLAB with numerous nested loops that cannot be vectorized. To speed up processing I "codegen" this file. The problem here is that I am calling a function which is in gcc (...
ASantosRibeiro's user avatar
0 votes
1 answer
1k views

I'm trying to compile a Simulink algorithm to a CarPC. The CarPC is based on a Intel Atom processor and runs in LINUX. The idea is compile the Simulink code with the Matlab embedded coder to the ...
user2956741's user avatar
0 votes
2 answers
2k views

I wanted to convert my simulation code in Matlab to C++ and run it with a C++ compiler such as Visual Studio or g++. I modified my code to successfully build a C++ project using Matlab Coder. The ...
Ash3323's user avatar
  • 74
-1 votes
1 answer
3k views

When I use matlab function block in Simulink. I use another matlab function which contains cell type. But simulink reported error message because of cell. How to avoid this? I'm kind of don't want ...
Pu Zhao's user avatar
  • 11
0 votes
1 answer
371 views

I am using SIMULINK and I needed to define a Rotation Matrix 3,3,N where N is the number of Robots which I am trying to simulate. To do that, because I am also using the Simulink Coder I had to define ...
desmond13's user avatar
  • 3,209
0 votes
1 answer
111 views

I am trying to compile a Matlab function to C. Here you have the declaration of the function: function [SpdLmt0, SpdLmt1, SpdLmt2, SpdLmt3, SpdLmt4, SpdLmt5, SpdLmt6, SpdLmt7, SpdLmt8, SpdLmt9, ...
user2956741's user avatar
0 votes
2 answers
2k views

I have the following problem. I have a SIMULINK model and in this model I have a block: Matlab Function, the following http://it.mathworks.com/help/simulink/slref/matlabfunction.html To my function ...
desmond13's user avatar
  • 3,209
1 vote
1 answer
285 views

I have a function (with the code given below) that I wish to convert into a MEX file. I am trying to use matlab coder to do so. %% Inputs dof = 3; num_divs = 72; ind_cr = 0 0 1 1 ...
axva1663's user avatar
0 votes
1 answer
120 views

I have created a MEX file using MATLAB's Coder toolkit, and it works perfectly fine on my computer, however, when I sent it to someone else for their use, it error and would not work. What are the ...
G Boggs's user avatar
  • 391
0 votes
1 answer
1k views

Ok so I have a script that runs among other things lsqlin optimization function millions of times. To speed up this code I "codegen" it (basically automatically creates some mex files). This is a ...
ASantosRibeiro's user avatar
0 votes
1 answer
243 views

Hello Im trying to transform a function to a .mex function through the command "coder". One of my inputs is a sparse double matrix. when the coder asks to define the type of the variable 'Mf' I setit ...
Christoforos Rekatsinas's user avatar
1 vote
1 answer
150 views

I am looking for a product which will convert my Matlab code into C++ code. I have looked into Matlab Coder extensively but it seems that it will not suffice as it is only compatible with versions of ...
Dingess's user avatar
  • 27
2 votes
2 answers
451 views

I've used MATLAB's coder tool to create a MEX version of the matrix exponential function, to be used in another set of functions. The issue is, the MEX version gives different results than the ...
G Boggs's user avatar
  • 391
1 vote
1 answer
101 views

So I tried the matrix exponential function using MATLAB's Coder toolkit, and I got it to build. I went on to test to see if the results were reliable and more efficient. While the code was faster, the ...
G Boggs's user avatar
  • 391
1 vote
2 answers
3k views

I would like to transmit an encoded image using USRP. The first step is to load the image using Matlab and encode it. The respective codes are shown as follows. function msg = genMsg1 %#codegen ...
Jinlong's user avatar
  • 77
0 votes
1 answer
2k views

I would like to create a global array within a Matlab function block in Simulink that grows in size, each time the Matlab function block is called. The only approach to create global variables in a ...
Rakesh's user avatar
  • 5
0 votes
1 answer
1k views

I am converting a MATLAB written function into C by "Matlab coder". After I get the converted files , the converted function always have first input argument as const emlrtStack *sp. Now when I am ...
user3013746's user avatar
0 votes
1 answer
433 views

I am trying to MEX some code by using MATLAB's coder toolkit. The code initially had cell arrays in it which is not handled by the coder at the moment, so I decided to use structs in compensation for ...
G Boggs's user avatar
  • 391
0 votes
1 answer
1k views

I basically am using MATLAB for image processing. I want to develop an Android app which can support the processing provided by MATLAB. I searched for results about it but failed to get clarity out of ...
varun naagaraj's user avatar
0 votes
1 answer
524 views

I am trying to convert the expm function for calculating the exponential of a matrix from C++ to Mex, in order to increase efficiency. However, this would be a very arduous task to convert the C++ ...
G Boggs's user avatar
  • 391
3 votes
1 answer
2k views

I'm trying to use a dynamically growing array of structs in a piece of code that is supposed to be converted to C with Coder: I initialize the struct and then declare its fields variable size for ...
sobek's user avatar
  • 1,436
0 votes
2 answers
835 views

I am trying to convert the below Matlab code into C++ using codegen. However it fails at build and I get the error: "??? Unless 'rows' is specified, the first input must be a vector. If the vector ...
user3926194's user avatar