Answered
Which is the best book for S-functions in MATLAB?
You may want to look at <http://www.mathworks.com/matlabcentral/answers/16879-what-s-the-best-approach-for-learning-s-function-d...

12 years ago | 0

| accepted

Answered
MEX-File in a M-File
Are you using the S-function target to generate the MEX-file from the Simulink model? If so, I don't think you can call into it ...

12 years ago | 0

Answered
How can i get the updated contnuous states xC in mdlDerivatives block itslef (C-S Function)
No, I don't believe what you're asking for is directly possible. The Simulink Solver performs the integration *after* |mdlDeriva...

12 years ago | 0

Answered
How to run Arduino Code with Matlab
The "sample usage" section on the <http://www.mathworks.com/matlabcentral/fileexchange/32374 MATLAB Support Package for Arduino>...

12 years ago | 0

Answered
Using rtwmakecfg to tell RTW to use precompiled object instead of S-Function code
What is the System Target File that you are using for code-generation? Is it specific to your target (since you are attempting t...

12 years ago | 0

Answered
Not able to run Matlab Standalone Executable
Please look at <http://www.mathworks.com/matlabcentral/answers/33638 this previous answer>.

12 years ago | 0

| accepted

Answered
Why is the output of the Simulink 'Bitwise Operator' a matrix (CompiledPortDimension)
It looks like the 'Bit Mask' parameter on the block may be a non-scalar in your block, which is why the output is a matrix even ...

12 years ago | 0

Answered
How to create dll for "C' code in matlab
You need a license for the MATLAB Coder product. Please see <http://www.mathworks.com/help/coder/ug/generating-dynamic-c-c-libra...

12 years ago | 0

| accepted

Answered
Simulink: Run model again without recompiling
Would you perhaps want to consider referencing your model as part of another test harness model (see <http://www.mathworks.com/h...

12 years ago | 1

Answered
S function execution based on Simulation and RTW build
Typically this is achieved by creating a TLC file for the S-function (see <http://www.mathworks.com/help/rtw/tlc/inlining-s-func...

12 years ago | 0

| accepted

Answered
Matlab 2006B & 2007B Simulink Model for Stateflow (.mdl) Compatibility?
In general, the output of a Simulink model should not change across releases. There may be changes to parameters or replacement ...

12 years ago | 0

| accepted

Answered
Can simulink be saved data to workspace with 'To workspace' block at end of simulation
See the second paragraph in my answer <http://www.mathworks.com/matlabcentral/answers/27443#answer_35846 here> to see what I thi...

12 years ago | 0

Answered
Generate a C/C++ code from Interpreted MATLAB Function block in simulink
You cannot generate code from an Interpreted MATLAB Function block (in any release). You need to use the <http://www.mathworks.c...

12 years ago | 0

| accepted

Answered
Use Maltab Classes inside simulink
The |Simulink.Parameter| class is already on the MATLAB path (it is added at the time of Simulink installation). Assuming th...

12 years ago | 0

| accepted

Answered
About S -function errors ,How can I solve the problems?
Only 3 arguments are passed to the |mdlUpdate| stage, so you need to define your function prototype as: sys=mdlUpdate(t,x,u...

12 years ago | 0

| accepted

Answered
working with mwArray in C++: How to extend it...
I'm not sure, but it doesn't seem like mwArray's of double-matrix types can grow dynamically. From the <http://www.mathworks.com...

12 years ago | 0

| accepted

Answered
Why are embedded functions created in 2012 changing to s functions when model used in 2010?
AFAIK, (Embedded) MATLAB Function blocks have always executed by generated C code from the MATLAB code in the block. This C code...

12 years ago | 0

Answered
Download a script (*.m) instead of BLOCK DIAGRAM (*mdl) into target PC.
You can use <http://www.mathworks.com/products/matlab-coder/ MATLAB Coder> to generate standalone C code from MATLAB code and co...

12 years ago | 0

Answered
getting function name within that function run or currently running function
<http://www.mathworks.in/help/matlab/ref/mfilename.html mfilename> seems like the right solution for your case. Are you testing ...

12 years ago | 0

Answered
When a Matlab function block running inside a simulink model gives an error, how can I find out which line the error occurred on?
You could try using <http://blogs.mathworks.com/pick/2008/04/28/matlab-basics-using-dbstop-if-error/ dbstop if error> to see if ...

12 years ago | 0

Answered
Using Embedded Matlab Function
Please see this previously answered question: http://www.mathworks.com/matlabcentral/answers/46993

12 years ago | 1

Answered
Calling Matlab from C++: How to pass in no arguments in varargin?
I don't have a whole lot of experience with MATLAB Compiler, but does it work if you create varargin as an empty cell array and ...

12 years ago | 0

Answered
Can I add line after closing simulink model?
I don't think the handles are valid once the model is closed and re-opened. You need to use |find_system| to grab the handles ag...

12 years ago | 0

Answered
How to force Simulink to show all update-time errors?
I don't think this is currently possible, because of the sequential manner in which the Simulink Engine works. In most cases, th...

12 years ago | 0

| accepted

Answered
Error message Mex File Matlab
After compilation, you MEX-file should have the name amortiss (same name as the .c file) with a platform-specific extension like...

12 years ago | 0

| accepted

Answered
How to get the new value of a changed mask parameter in the dialog callback?
I think you need to just use the 'parametername' directly since it exists as a variable in the Mask workspace. Does that work?

12 years ago | 0

| accepted

Answered
build a file exe for file .m linked to a file simulink
Please see this previously answered question: http://www.mathworks.com/matlabcentral/answers/58741

12 years ago | 0

Answered
Unexpected behavior with From Workspace block in Simulink
(I presume you meant that 0.01 is your model's sample rate, because 0.05 is 50 times 0.001, not 5 times) This looks like an f...

12 years ago | 0

| accepted

Answered
Convert the m-file into mex32 file for S-function block
Why not just <http://www.mathworks.com/help/matlab/ref/pcode.html pcode> your MATLAB-file and send just the .p file to your user...

12 years ago | 0

Answered
RTI Build Error after updating MATLAB
Is the RTI target a dSPACE product? If so, you should contact dSPACE Support, since this does not appear to be a MathWorks produ...

12 years ago | 0

Load more