Beantwortet
How do I use C++ classes in a mex file?
You can instantiate it just like you would in any other C++ file. And yes, you will need to compile that class also into the MEX...

mehr als 14 Jahre vor | 0

Beantwortet
Use of Function Handle and fmincon in Embedded MATLAB
As Sean pointed out, here is the documentation about support for function handles with code generation - <http://www.mathworks.c...

mehr als 14 Jahre vor | 0

Beantwortet
MATLAB appcrash when I use mxFree in S-Function
ssGetPWork(S) returns memory owned and managed by Simulink - you should not be freeing this memory in your own code. Is there a ...

mehr als 14 Jahre vor | 0

Beantwortet
Dynamically sized outputs / work vectors using the Legacy Code Tool
What you're looking to do is output a <http://www.mathworks.com/help/toolbox/simulink/ug/br65qom-1.html variable-size> signal. U...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Generating Code from RTW and compiling using MSVC++ 2008 express edition
I don't know if this has been tried before, so I can't provide a link to an existing example. However, it should definitely be p...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
MEX file debugging with MS Visual Studio
When you compile the MEX-file, did you use the mex -g option so that a debuggable binary is built? If using Visual Studio, you s...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Converting Matlab code to C code
To expand's on Walter's answer, your MATLAB code should look like this: function val = matc(n) val = 0; for i = 1...

mehr als 14 Jahre vor | 2

Beantwortet
Real time workshop code generation with S-function
What is the error that you get exactly? Do you see the error even without your custom hooks? I'm think that you need at least a ...

mehr als 14 Jahre vor | 0

Beantwortet
accessing port data types during Complilation
You cannot run this code during mask initialization, because mask initialization is actually one of the stages of the model comp...

mehr als 14 Jahre vor | 0

Beantwortet
Mask Subsystem Parameter global using
Why not created a variable in the workspace which holds the parameter value and enter that variable name everywhere that you nee...

mehr als 14 Jahre vor | 0

Beantwortet
can we burn directly matlab programming into PIC without using micro-C language
Almost all embedded processors only provide compiler tools that convert C code to the appropriate binary format. Unless the vend...

mehr als 14 Jahre vor | 3

Beantwortet
Keep Simulink simulation stable
The points that you describe are for stability with respect to system dynamics - not software stability (ie. crashes). In genera...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
plz help me out with this error..matrix dimension mismatch
IMREAD usually returns a 3-D matrix, but you are collapsing the size to a 2-D by using: [m n]=size(img1); Try: [m n...

mehr als 14 Jahre vor | 0

Beantwortet
how to use .net assembly generated in matlab
See <http://www.mathworks.com/help/releases/R2011b/toolbox/dotnetbuilder/ug/f6010dfi6.html Programming with COM Components Creat...

mehr als 14 Jahre vor | 0

Beantwortet
Can Accelerator work on model with algebraic loop?
Starting in R2011b, <http://www.mathworks.com/help/toolbox/simulink/rn/bs0fxnc.html#bs0f1dw Accelerator Mode Now Supports Algebr...

mehr als 14 Jahre vor | 2

| akzeptiert

Beantwortet
Extract state space from Simulink - Blocks without pre-programmed exact Jacobian
I don't know a lot about linearization, but here are some <http://www.mathworks.com/help/toolbox/physmod/simscape/ug/bqvy3s5-1.h...

mehr als 14 Jahre vor | 0

Beantwortet
External DLL not working when deployed
Most likely, the DLL you are attempting to load, or one of it's dependencies were not found on the deployed machine. I would rec...

mehr als 14 Jahre vor | 0

Beantwortet
Ability to inherit parameter size with RTW S-function target?
I suspect that this might be a product limitation - perhaps you could file an enhancement request through MathWorks Tech Support...

mehr als 14 Jahre vor | 0

Beantwortet
Trouble with rate transition blocks and function-call subsystems in an interaction with a MATLAB embedded function
What error do you see when you put the block inside a Function-Call subsystem? I would recommend this configuration on the funct...

mehr als 14 Jahre vor | 0

Beantwortet
Dynamically change the number of ports of a block
Have you tried setting the number of input ports based on the parameter value? For example, try something like: block.NumInp...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Protecting dynamic masked subsystem
You might want to generate a protected model or S-function from an unmasked version of the subsystem, and then create the mask a...

mehr als 14 Jahre vor | 0

Beantwortet
Cant create the .ctf file using mcc command in 2009a
It is embedded into the generated binary by default starting in R2008b. If you do not want it to embedded, uncheck the Embed CTF...

mehr als 14 Jahre vor | 0

Beantwortet
Unable to find MCR Installer in R2010a?
If you already have MATLAB Compiler installed, type the following command to locate the MCR installer: >> mcrinstaller

mehr als 14 Jahre vor | 1

Beantwortet
Regarding XPC Target
See <http://www.mathworks.com/help/toolbox/xpc/gs/f1-9588.html#f1-13260 Test 2, Ping Target System xPC Target Ping>.

mehr als 14 Jahre vor | 0

Beantwortet
How i edit the font of microsoft document file
From your previous question, it looks like you are already familiar with the COM API (if not, see http://www.mathworks.com/matla...

mehr als 14 Jahre vor | 1

| akzeptiert

Beantwortet
How i can perform file operations on microsoft document file
See the previous discussion here: http://www.mathworks.com/matlabcentral/answers/1531-word-com-writing-text-into-this-open-docum...

mehr als 14 Jahre vor | 1

| akzeptiert

Beantwortet
Is it possible to get a matlab to C code converter? I have a .m file that is to be used in quartus 2(fpga tool).So I need to generate the C equivalent for the code in hand.
You can use <http://www.mathworks.com/products/matlab-coder/ MATLAB Coder> to convert MATLAB code to C code automatically, but o...

mehr als 14 Jahre vor | 1

Beantwortet
.m to .mdl
Do you want to set it on a model that is already open? If yes, you can use the <http://www.mathworks.com/help/toolbox/simulink/s...

mehr als 14 Jahre vor | 0

| akzeptiert

Beantwortet
Can I use Matfile LIbrary to access MAT files from C program without using mex
Yes, you can write standalone applications using the MAT-file library than can run independent of MATLAB. You just need to copy ...

mehr als 14 Jahre vor | 1

| akzeptiert

Beantwortet
Problem in serial communication between Simulink and Arduino
Your best bet might be to contact the author of the block library - in this case, Matt Bilsky I guess? Also, this paragraph make...

mehr als 14 Jahre vor | 0

Mehr laden