Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
149 views

I am after a MATLAB code which marks each point in a 2d array (image) if it is a local maximum over a 3x3 neighborhood. The MATLAB code will be used to generate a c code using MATLAB Coder. A vanilla ...
Avi T's user avatar
  • 165
1 vote
1 answer
814 views

I am using Matlab Coder to generate C code to be used as a subsystem of a larger C project. A first attempt at a code generation command would be codegen -config cfg -o ... where cfg is the name of a ...
ummg's user avatar
  • 291
0 votes
0 answers
68 views

I've developed a video recording app in Android with Camera 2 in order to develop some experiments of imagem processing. Since now, my approach to process videos was to download it from emulator and ...
Matheus Fortunato Alves's user avatar
1 vote
1 answer
220 views

I would like to call a C function compiled using Matlab Coder in R for later use in a Shiny app. How can I go about doing this. The top of the .C function looks like this: double ...
Brandon Hoglund's user avatar
1 vote
0 answers
56 views

I read a DICOM image into an OpenCV matrix, I need to store the pixel data into coder::array<unsigned short, 2U> array because I have a C++ code generated function (using MATLAB) that takes this ...
Vukosi Mboweni's user avatar
1 vote
0 answers
31 views

I have C Code generated from MATLAB Coder. I lost the SimuLink model that generates this code. There is any form to do the inverse process? That means, convert the previously C Code generated from ...
Enzot's user avatar
  • 11
0 votes
1 answer
151 views

I'm working on translation of some old MATLAB code to C++. I have noticed, that my custom function to calculate histogram that supposed to be equivalent to MATLAB [counts,centers]= hist(___) gives ...
Albert's user avatar
  • 23
1 vote
0 answers
248 views

I have enabled dynamic memory allocation in Simulation Target>Advanced with default threshold as 0. Then I attempt to run this code: B={{nan}}; %%Defining so that it can be set as size variable. ...
space_monkey's user avatar
1 vote
1 answer
69 views

My teacher has assigned me to work combine RGB channels and create a GR image, whose results are like a negative image as shown here: I have tried the following code: GR1=(double(100*green_channel/1+...
Samreen Mangi's user avatar
0 votes
0 answers
314 views

I tried to use matlab coder to convert my matlab file into C\C++ source file. In my *.m file,I defined a dynamic array: ... ... coord_list = []; I_list = []; ... for i=1:n .... coordinate = ...
zhouzhou's user avatar
2 votes
1 answer
468 views

How can I force matlab embedded coder to set "boolean_T" as "bool" C99 type? Without that, I need explicit cast conversion I/O signals mapping for int->boolean_t (not needed for ...
David Bonnin's user avatar
-1 votes
1 answer
179 views

the toolchain I use is Clion MinGW Bundle the original code was generated by matlab Why SIGTRAP occured when tried to allocate memory? #define CODER_NEW(T, N) new T[N] void reserve(SZ _n) { if (_n ...
desperateLord's user avatar
0 votes
1 answer
231 views

My question is quite basic to most appropriate levels on consideration. I lack the perception of how can I dump or implement my matlab code on a hardware component like processors or fpga? For eg: ...
Sukshith Shetty's user avatar
1 vote
0 answers
125 views

For my project, I have been generating ClassificationECOC models and using the Matlab Coder framework to generate C code from them. The methodology for this is laid out in the loadLearnerForCoder ...
Prabhakshavel Venkata's user avatar
1 vote
0 answers
136 views

I am writing a test program to evaluate a function written in MATLAB and converted to C code by the MATLAB Coder. This function takes complex inputs, and I'd like to use CFFI to cast this data from a ...
rbm99's user avatar
  • 11
0 votes
1 answer
180 views

I have two tables: Table 1 has two columns called WP_1 and WP_2. Table 2 has three columns called WP1, WP2 and WC. For every pair (row) of WP_1 and WP_2 I want to check if they are within any pair (...
beginnertryingtolearn's user avatar
0 votes
1 answer
166 views

I'm trying to generate my MATLAB code to C. I have some issues about unsupported functions. Are there any alternative functions for 'mkdir', 'fileattrib' and 'dlmread' functions in MATLAB Coder?
malicelik's user avatar
1 vote
1 answer
347 views

I have a MATLAB (R2020b) function that I am trying to convert to (Linux-compatible) C program using MATLAB Coder. The function accepts 3 string arguments like so: function func1(a, b, c) I would like ...
urig's user avatar
  • 16.9k
0 votes
0 answers
166 views

I am trying to convert this simple MATLAB function to C++ using MATLAB coder: function uniqueC_conversion() a= [1 0 1 2 4 5 1] b=unique(a) end The output is like this: // // uniqueCPP.cpp // // Code ...
mir's user avatar
  • 9
1 vote
1 answer
1k views

I am trying to convert .m script to C++ using MATLAB Coder. function P=r_p(1,var1,var3) p=[[3,7] [10,15] [6,19] [21,19] [43,11] [969,2] [113,9] [43,59] [21,15] [6,15] [10,18] [3,15]]; ...
manoj manu's user avatar
0 votes
1 answer
296 views

I am working with a heavily object oriented code in MATLAb. I want to use GPU coder to accelerated the code. However GPU coder only works for functions and the argument of the function should be ...
mir's user avatar
  • 9
2 votes
2 answers
313 views

I am trying to test some code that has been generated from Matlab into C++. To do this I am attempting to integrate and run the generated C++ code back into Matlab. Here's the function I am trying to ...
TachyonCasio's user avatar
1 vote
1 answer
453 views

I need help initialising and using custom C structs in MATLAB. My goal is to write MATLAB code utilising external C structures and functions. The resulting MATLAB code with these C structures will be ...
mabalenk's user avatar
  • 1,053
0 votes
1 answer
109 views

I'm specifically looking at something like Matlab's firpm function (I know there are C implementations of Remez available online in several sources).
dg1271's user avatar
  • 41
0 votes
1 answer
910 views

I am facing a problem while trying to link opencv to CPP project generated by Matlab Coder. In the auto generated Makefile of the project, I added pkg-config --cflags opencv to CFLAGS and pkg-config --...
Suzy's user avatar
  • 107
1 vote
1 answer
166 views

Using MATLAB Coder in 2019b, the following line: se = strel('line',20,85); that MATLAB Coder is unable to effectively describe: 1.All inputs must be constant. 2.Function call failed why is Coder ...
ccx's user avatar
  • 13
2 votes
1 answer
1k views

I would like to use MATLAB Coder to generate an executable (or a function in an object file) that accepts a pointer to an array as an input. I used libpointer to create a pointer object and then tried ...
Joe Mack's user avatar
  • 138
1 vote
1 answer
1k views

I can't find how to force Matlab coder to make a parameter size be variable rather than fixed. Here is a MCVE: Function code: function [sz] = my_varsize(x) sz = length(x); end Sample main ...
jpo38's user avatar
  • 21.9k
3 votes
2 answers
92 views

I'm generating code for a function with several variable-sized arrays. The code needs to be compiled in both linux (with gcc) and windows machines (with MinGW). To "ensure capacity" in those ...
Mefitico's user avatar
  • 1,176
1 vote
2 answers
1k views

I'm using Matlab Coder to convert this code to C++: fs = 50; [b,a] = butter(3,0.5/(fs/2),'high'); ... % Other code using fs Then, I get this error: "All inputs must be constant". If I do: [b,a] = ...
jpo38's user avatar
  • 21.9k
2 votes
1 answer
2k views

I have a simulink model using matlab function blocks. When i try to generate the C code from my model, the structures parameter scopes i used to represent my data are unused : When i say unused i ...
Hood's user avatar
  • 63
0 votes
1 answer
872 views

I'm developing a Simulink model with many constants. I'm trying to: Avoid hardcoding every constant in the model and have something unreadable. Be able to know what that 9.73288483... constant in ...
Hood's user avatar
  • 63
1 vote
1 answer
468 views

I need to port a MATLAB script, which uses .csvs to read and write configs and data with csvread(), to C++. Obvious choice was to use the Coder app in MATLAB but csvread() is not supported by Coder. ...
kamikatze13's user avatar
-1 votes
1 answer
416 views

I am new to RISC-V. I want to convert that MATLAB code(M-file) to RISC-V Assembly code, can anyone give some suggestions or inputs on how can I do it. Regards, Yulia
Yulia's user avatar
  • 29
1 vote
1 answer
176 views

Consider the following matlab program: function results = prog() opts.x = 1; if ~isfield(opts, 'y'); opts.y = 1; end 'asdf' return I am able to run this program successfully in matlab ...
Mathew's user avatar
  • 1,600
2 votes
0 answers
146 views

I am trying to convert some of my MATLAB files to Python. I generated C code using the MATLAB Coder, then compiled everything in a library. I am now trying to make the wrapping for Python. It looks ...
Helene Ayari's user avatar
0 votes
2 answers
1k views

I am trying to generate C code for a Matlab function. It uses mongoose web server for communication. If I place the .h/.c files in the same folder as the .m file I can compile everything fine using: ...
Hamza Yerlikaya's user avatar
1 vote
1 answer
2k views

I had one structure in my code which was created with a function create_a_structure.m with a_struct = create_a_structure(). Several other functions either called this function, modified the values in ...
Mefitico's user avatar
  • 1,176
2 votes
1 answer
768 views

I need to convert this code into C code. Questions: Will MATLAB Coder generate C code that are memory safe, e.g they not using calloc or malloc. Misra C standard does not allow coder to use dynamical ...
euraad's user avatar
  • 2,887
0 votes
0 answers
109 views

I translated my MATLAB code to C++ using MATLAB Coder and I changed the main.cpp to create a executable. Everything seems ok until here, but when I print my predict output, my classname has an extra ...
FFFF's user avatar
  • 1
1 vote
1 answer
184 views

I'm working with Matlab coder, using variable size variables pointed out with coder.varsize. This causes some variables to be declared with the type emxArray_real_T, be initialized with emxInit_real_t,...
Mefitico's user avatar
  • 1,176
1 vote
1 answer
354 views

I am looking for procedure or suggestions if this is do able or not. I have source files or (object code) which is compiled on a MATLAB environment using embedded coder. Now I want to bring those ...
Guru G's user avatar
  • 11
0 votes
1 answer
187 views

My intention is to show for the output of Matlab System a string the type char_T data[ ], that I receive a function in C through coder.ceval I want to show more specifically the buffer variable, as ...
bereware's user avatar
2 votes
2 answers
601 views

I recently started working with Matlab coder for building computer vision algorithms. I'm working on a point cloud classification problem which means that my algorithm input is a set of 3D points (x,y,...
TripleS's user avatar
  • 1,246
0 votes
1 answer
295 views

How can I create a constant variable in MATLAB (and its results the generated C code), so I can use it later in my code to specify the size of variables. I want to have an array that its size is not ...
Amin Ya's user avatar
  • 2,049
2 votes
1 answer
121 views

I have the following directory structure: main +model run.m +options opt.m main.m and so forth. I have a function under +model directory called run that depends on some functions ...
Girardi's user avatar
  • 2,819
0 votes
1 answer
83 views

How can I prevent MATLAB Coder to generate variable size code for a simple number insertion into a string? for i=1:4 name=sprintf('Data%d.bin',int8(i)); stuff(name); end In the generated C ...
Amin Ya's user avatar
  • 2,049
5 votes
2 answers
950 views

After segmenting an image into N superpixels, I need to specify the superpixels that are adjacent or non-adjacent to one superpixel and determine this relationship for all superpixels. [L,NumLabels] =...
dtr43's user avatar
  • 165
1 vote
2 answers
560 views

I generated code for loading a mat file as follows data=coder.load('data.mat'); a=data.a; b=data.b; Because one of the variables, for example "a", is very big, it is defined as a big static const ...
Amin Ya's user avatar
  • 2,049
1 vote
1 answer
628 views

I am trying to use the MATLAB Coder toolbox to convert the following code into C: function [idx] = list_iterator(compare, list) idx = nan(length(list)); for j = 1:length(list) idx(j) = strcmp(...
Vivek Subramanian's user avatar

1
2 3 4 5 6