Answered
Integrating MATLAB generated c-code in Visual Studio
If you are using MATLAB Coder, the generated code will be completely independent of MATLAB run-time libraries. However, not all ...

12 years ago | 0

| accepted

Answered
Simulink model argument (for model referencing) with unknown array size
I don't think there is a workaround for this situation. The sizes and types of parameters cannot change after compilation. Howev...

12 years ago | 0

Answered
Which function to use to simulate a Model from a library?
Please look at the documentation for <http://www.mathworks.com/help/ecoder/ug/creating-and-using-host-based-shared-libraries.htm...

12 years ago | 0

Answered
Plot x-axis and y-axis with mexCallmatlab
You need to use the |plot(x,y)| form of <http://www.mathworks.com/help/matlab/ref/plot.html PLOT>: // Copy freq into an mx...

12 years ago | 0

| accepted

Answered
Is it possible to add Simulink blocks in a Model using m-scripts?
Yes, this is possible. Please see the list of Simulink command-line functions <http://www.mathworks.com/help/simulink/functionli...

12 years ago | 0

| accepted

Answered
What blocks do I need to to use to build such a system?
Since it appears that you know how to define your system in the form of ODEs, you may find this blog post helpful: <http://blogs...

12 years ago | 0

| accepted

Answered
s-function link error when build for rtw, dspace ?
To add custom S-function related build rules for code generation, you need to implement a <http://www.mathworks.com/help/rtw/ug/...

12 years ago | 0

Answered
How can I incorporate a S-function in Simulink so that it executes a code written in MATLAB?
You can call the function using any one of <http://www.mathworks.com/help/simulink/ug/types-of-custom-blocks.html#bq3t2zz three ...

12 years ago | 0

Answered
How to call dll in mex?
This seems like more of a C/C++ programming question, than a MATLAB-specific question. A MEX-file is like any other C-file which...

12 years ago | 0

Answered
c++ shared library startup options
It looks like specifying the -singleCompThread option during compilation should also work. For example: >> mcc -R -singl...

12 years ago | 0

Answered
How can I interface a set of 32-bit hardware registers with a Simulink Model generated using Simulink encoder?
You can use C-MEX S-functions to create custom driver blocks that call into your C driver code. Please use the <http://www.mathw...

12 years ago | 0

| accepted

Answered
Plot from C Mex function and C types
I would recommend looking at the documentation for <http://www.mathworks.com/help/matlab/apiref/mxcreatedoublematrix.html mxCrea...

12 years ago | 0

| accepted

Answered
Alter values of variables in mexFunction from within a subfunction
You probably need to do this: /* Copy the outputs of minf into a and b */ *a = *(mxGetPr(outp[0])); *b = *(mxGetPr(...

12 years ago | 1

| accepted

Answered
Output type definition for extrinsic function (polyxpoly) in Simulink
Since the Embedded MATLAB block uses static memory allocation, it cannot handle variables that change size dynamically. What you...

12 years ago | 2

| accepted

Answered
How do I create stub functions in simulink for legacy code?
I think the right way to do what you want to achieve is to create a DLL for your external C-functions and load it dynamically fr...

12 years ago | 0

Answered
How to create a standalon exe of mfile including mexfunction?
Since you would like to compile a MEX-function, which needs MATLAB runtime libraries to be executed, the right choice would be f...

12 years ago | 0

| accepted

Answered
Real-Time Workshop use Embedded Matlab Function to generate random numbers
Here is the current list of <http://www.mathworks.com/help/simulink/ug/functions-supported-for-code-generation--alphabetical-lis...

12 years ago | 0

| accepted

Answered
Is there a tool to generate a bus object from an IDL file?
If you can produce MATLAB structures from the IDL file, you can use <http://www.mathworks.com/help/simulink/slref/simulink.bus.c...

12 years ago | 0

Answered
Dynamically populating mask parameter popup list
I'm not much of an expert in the Simulink Mask area, but I don't think you can dynamically change the contents of a mask. Howeve...

12 years ago | 0

Answered
How setup Xilinx System Generator in Matlab
You might have better luck with this question on Xilinx Support forums, since System Generator is a Xilinx product.

12 years ago | 0

| accepted

Answered
Use of Arrays in Simulink
Perhaps you can <http://www.mathworks.com/help/simulink/slref/bitwiseoperator.html AND> all the bits in the array together?

12 years ago | 0

Answered
Problem in using Fsolve in Simulink
Are you able to run |fsolve| with similar input arguments (as passed in from the Interpreted MATLAB Function block) outside of S...

12 years ago | 0

Answered
Converting mxArrays to libpointer in MATLAB block
I would recommend that you move all creation/extraction of libpointers also inside an extrinsic function, and have only builtin ...

12 years ago | 0

| accepted

Answered
Whenever I run a simulink model which involves embedded math function I get this message. I am using Matlab R2012a on mac OS
You may want to look at <http://www.mathworks.com/matlabcentral/answers/18593-gcc-4-2-not-found this previously answered questio...

12 years ago | 0

Answered
Running a Subsystem in a function as iteration in simulink
How about using a <http://www.mathworks.com/help/simulink/slref/whileiteratorsubsystem.html While Iterator Subsystem> inside an ...

12 years ago | 0

Answered
Saving variable of selected value from simulink matlab fcn to workspace
Is there a reason the value needs to be stored to the MATLAB workspace? You could either use a <http://www.mathworks.com/matlabc...

12 years ago | 0

Answered
S-Function Builder Block referencing .dll
DLLs are typically only used at run-time, not compile-time (the information you put in the S-function Builder is used to compile...

12 years ago | 1

| accepted

Answered
Serial Port in RTWT (s-function)
Ah! I think it might be because you are not configuring the number of PWorks on the S-function as described <http://www.mathwork...

12 years ago | 0

Answered
Regarding Code generation error
It does say on the <http://www.ti.com/tool/SPRC215 F280x Digital Motor Control Library> Download page: These component modu...

12 years ago | 0

Answered
In S function it is required to include the .c file that is having the defination of the function?
Yes, you do need to link against the object files of A(), B() and C() in addition to XYZ.c. How are you compiling XYZ.c in Visua...

12 years ago | 0

Load more