Answered
Compiling with Mex - Can I reference Environment Variables?
Try: mex -v COMPFLAGS="$COMPFLAGS -I%REF_DIR%/include" my_sfunction.c I think this command, or a minor variation on it s...

14 years ago | 0

Answered
S-function: In which initialization callback function is the input data available to use?
The inputs to an S-function are only reliably available in the mdlOutputs method. The inputs to any block are the outputs of oth...

14 years ago | 0

Answered
Debuging continuous states in a discrete simulation
The error occurs because you have continuous states in your model (for example, blocks from the Continuous sub-library in the Si...

14 years ago | 1

Answered
How to run "mex" with linking a dll file
I'm not all too familiar with building/linking against DLLs, but typically the .lib corresponding to a .dll is the import librar...

14 years ago | 1

Answered
library browser hierachy
A similar question was answered before: http://www.mathworks.com/matlabcentral/answers/13851-sub-libraries-do-not-appear-in-the-...

14 years ago | 0

| accepted

Answered
problem with building a simulink model with two s-functions written in C language
You need to compile them separately - they need to be two separate binaries: mex MPCtest1.c mex MPCtest2.c

14 years ago | 0

| accepted

Answered
NIPCIe6323 Driver for simulink RTW
In general, Real-Time Workshop (now, Simulink Coder) generates ANSI/ISO C/C++ code and thus supports all embedded microprocessor...

14 years ago | 0

Answered
64bit Linux opening .mat file in C: library not linking
The shared object files to add to LD_LIBRARY_PATH are only needed at run-time (when the application attempts to load the librari...

14 years ago | 0

| accepted

Answered
Missing lib lMTwister when compiling C++ program for matlab engine in debian
It looks like this library may have existed in very old versions of MATLAB (from a web search, I found references that suggest t...

14 years ago | 0

| accepted

Answered
Can I use ICPCON i7018 AI module for data acquisition in Simulink?
It doesn't look like this hardware is currently supported with the Data Acquisition Toolbox. You may need to write your own adap...

14 years ago | 0

Answered
How to pass a matrix input argument to a VBA function generated by MATLAB Builder EX?
I'm not all too familiar with calling MATLAB Builder EX components from VBA, but I thought this documentation example may help y...

14 years ago | 0

Answered
Using user defined structure as precision to fread
There is no precision format to directly read into a structure. You need to read the file into arrays/matrices and then later co...

14 years ago | 1

Answered
Matlab Coder and Ceval
Try: for n=2:10 coder.ceval('printf','%d ',int32(n)); end or for n=2:10 coder.ceval('printf','%f ', n); end ...

14 years ago | 0

| accepted

Answered
Simulink's Audio Reverberation demo with ADSP-BF537 EZ-KIT Lite - unable to connect
What version of MATLAB are you using? It looks like the latest release (R2011a) does support Windows 64-bit: http://www.mathwork...

14 years ago | 0

Answered
mcc and startup
The MATLAB path (that you add to using addpath) is only used to resolve MATLAB/Simulink related files (like .m, .p, .mat, mexw32...

14 years ago | 0

Answered
Stateflow:UnexpectedError when generating Simulink model code in 2011a
All Stateflow charts and Embedded MATLAB blocks generate C code and compile them for execution, the compiler selected using the ...

14 years ago | 0

Answered
Usage of functions of Optimisation toolbox along with Embedded Coder
Sorry, it doesn't look like any of the Optimization Toolbox functions are in the <http://www.mathworks.com/help/toolbox/eml/ug/b...

14 years ago | 0

| accepted

Answered
loadlibrary and calllib inside a C mex routine
I think it should be possible to continue using GetProcAddress in the MEX-function. However, remember that GetProcAddress belong...

14 years ago | 0

Answered
Problem: how to get datas from integrator block in simulink
On the Integrator block dialog, there is an option called "Show state port" that you can select to output the current state. Doe...

14 years ago | 0

Answered
MCRInstaller.exe
MCRInstaller.exe basically installs MATLAB Runtime Libraries, so that compiled MATLAB applications (which call into these runtim...

14 years ago | 0

Answered
How to solve Differential Equations in Simulink level 2 s function
Change your InitConditions callback to: function InitConditions(block) %% Initialize Dwork block.ContStates.Data(...

14 years ago | 1

Answered
Setting fields of a Matlab struct in C++
I think you might need to use operator(). Try: inputArray(fields[0],1,1) = field0Value;

14 years ago | 0

Answered
Highlight Simulink model lines with custom colors
The HiliteAncestors property is currently documented as "internal use only" - so I'm not sure where you got example usage from. ...

14 years ago | 1

| accepted

Answered
M-file S-function dimension
You shouldn't have to specify the input size of a variable-size signal - the S-function can get this information from the Simuli...

14 years ago | 0

Answered
question regarding code generation.
The rsim.tlc target allows rapid prototyping on a machine that has MATLAB/Simulink installed. Since you need to forward your mod...

14 years ago | 0

| accepted

Answered
GUI and real time simulation of Simulink model
For real-time simulation of Simulink models, you can use either <http://www.mathworks.com/products/rtwt/ Real-Time Windows Targe...

14 years ago | 0

Answered
probleme de connection entre les block dans simulink
Sorry, I can't write in French, but hopefully you can use a tool to get a reasonable translation: SimElectronics uses the Sim...

14 years ago | 1

| accepted

Answered
Warning: Unable to load block diagram 'xbsIndex_r4' in MATLAB 2007A
The library model xbsIndex_r4.mdl belongs to the Xilinx System Generator blockset. It looks like your model contains blocks from...

14 years ago | 1

| accepted

Answered
Mex 64bit library error
Please see my answer to <http://www.mathworks.com/matlabcentral/answers/12147-invalid-mex-file-cannot-dynamically-load-executabl...

14 years ago | 0

Answered
Unit Delay can't resolve discrete time
What have you set for "Sample time" on the block dialog? This needs to be discrete sample time for HDL code generation. If yo...

14 years ago | 0

Load more