Answered
Clear a persistent variable in a MATLAB Fcn block as serial object
Another thought could be to use the serial port I/O blocks directly in Simulink. See the |Blocks| heading here: <http://www....

12 years ago | 0

Answered
How to convert mxarray datatype in simulink
For allocating |logical| data use either of the functions |true| or |false|: x = true(size(u)); x = false(size(u));

12 years ago | 0

| accepted

Answered
Attempt to extract field 'Value' from 'mxArray'.
When using the output of an extrinsic function, it may often be necessary to preinitialize the variable to which it is assigned...

12 years ago | 4

| accepted

Answered
Fatal error U1077: How do I solve this issue?
Hi Jacob, It looks like the generated make file is having issues because of the space in the path C:\Program Files. It is tr...

12 years ago | 0

| accepted

Answered
Subscripting into an mxArray is not supported
|I2| is assigned as the output of |im2double| which is an extrinsic call. When doing that you need to assign |I2| prior to the ...

12 years ago | 2

| accepted

Answered
Using fprintf in MATLAB function block with rapid accelerator (R2013b)
FOPEN, FCLOSE and FPRINTF were supported for code generation in R2013a: <http://www.mathworks.com/help/coder/release-notes.ht...

12 years ago | 0

| accepted

Answered
Simulink: Read a file on RaspberryPi in external Mode [error: unknown type name ‘FILE’]
Nice to see someone using the RaspberryPi like this. Two issues: you need to include stdio.h (for the definition of popen and...

12 years ago | 1

Answered
c code conversion question
Is the variable data defined in the base MATLAB workspace? Try: whos to see the currently defined variables. If not, p...

12 years ago | 0

| accepted

Answered
Migration from 2010a to 2013b ,Problems
This is a hard question in general. My recommendation would be to first have a look through the release notes for the product(s...

12 years ago | 0

| accepted

Answered
Embeded MATLAB function variable-size signal
You can add calls to ASSERT which effectively bounds the values arguments: function y = fcn(u) %#codegen N = 10000; co...

12 years ago | 0

| accepted

Answered
Simulink Matlab Function block
You may want to add the variable as an input parameter under the ports and data manager: <http://www.mathworks.com/help/simul...

12 years ago | 0

Answered
Errors thrown when Parallel Toolbox invoked or Coder generation attempted
I'll suggest the usual suspects. Try running: rehash toolboxcache restoredefaultpath

12 years ago | 0

Answered
'Matlab Coder' generated code is NEVER of double type (only real_T)
Also if you are using MATLAB Coder in R2013b, you can request that C built-in types be used in the generated code for LIB, DLL a...

12 years ago | 2

Answered
Loading Files into Codegen Files
The function coder.load is now supported which loads data from a MAT file at compile-time as constants: <http://www.mathworks...

12 years ago | 0

Answered
c files compilation using Matlab coder
If you are generating a MEX function with MATLAB Coder then you can call the MEX files extrisically: <http://www.mathworks.co...

12 years ago | 0

| accepted

Answered
The most efficient method to start a matlab code within a C-Routine
Hopefully someone corrects me if I am wrong but option 2 should give you what you want if you are using MATLAB Compiler already....

12 years ago | 0

| accepted

Answered
Undefined variable "RTW" error on Matlab start before prompt appears and in coder
It seems like the file getInstance.p is not in your installation. What is the output of: ls(fullfile(matlabroot,'toolbox','...

12 years ago | 1

| accepted

Answered
Unable to use "cholupdate" in a Simulink Matlab function made for C code generation
CHOLUPDATE is not supported for code generation. You can see an exhaustive list of functions which are supported here: <http...

12 years ago | 0

Answered
error with coder.type('constant',value)
Did you put the line: a = coder.type('constant',value); in the code on which you are calling CODEGEN? The function code...

12 years ago | 1

| accepted

Answered
Matlab Coder not working
The supported version of GCC for R2013a is 4.4.*: <http://www.mathworks.com/support/compilers/R2013a/index.html?sec=glnxa64> ...

12 years ago | 0

Answered
How to select target for Embedded Coder / Matlab Coder
You can achieve this simply by using the project interface. Create a new project: coder -new myProj.prj In the UI which ...

12 years ago | 1

| accepted

Answered
Matlab coder generated mex function
Could it be possible that the array which is being passed to MAX has an empty dimension when you are running the MEX? The err...

12 years ago | 1

| accepted

Answered
coder.opaque + persistent statements at once
You should be able to do something like: persistent var; if isempty(var) var = zeros('int16'); end ... use var ......

12 years ago | 2

| accepted

Answered
how can i use events() in matlab coder.
Events are not supported for code generation. You can see the list of limitations here: <http://www.mathworks.com/help/fixed...

12 years ago | 0

Answered
How do I use Embedded Matlab Coder to generate C-code?
If you have a look at the supported compilers for R2008a: <http://www.mathworks.com/support/compilers/release2008a/macintosh....

12 years ago | 0

| accepted

Answered
MATLAB Coder Support for C11 and Textscan()
Hi Paul C11 and TEXTSCAN are both currently unsupported with MATLAB Coder. Using coder.ceval() it is possible to read from a fi...

12 years ago | 0

| accepted

Answered
How to pass a string into a Matlab function block?
Hi Ursula, You should simply be able to pass a MATLAB string to coder.ceval: Out = coder.ceval('MyFct', structArg.varName...

12 years ago | 2

| accepted

Answered
What do I use instead of fopen and fprintf when running Matlab Coder to convert m-file to mex to C/C++
FOPEN, FPRINTF and FCLOSE are supported for code generation starting in R2013a: <http://www.mathworks.com/help/simulink/ug/fu...

12 years ago | 1

Answered
Matlab Coder Error - Unable to create HTML report file?
To shut off the report you can: c = coder.config('mex'); c.GenerateReport = false; c.LaunchReport = false; and then p...

12 years ago | 0

Answered
embedded matlab function in simulink
Use hold('on') Command duality means using the non-function-style: hold on

12 years ago | 0

Load more