Answered
How to handle two static variable with same name in S function?
Seems like more of a C language question, rather than an S-function specific error. See: http://stackoverflow.com/questions/7215...

12 years ago | 0

Answered
Model Error: It appears that build process was unable to locate some Utility(e.g. make,compiler,linker, etc.)
Do both directories |C:\MATLAB\R2010b| and |.\..\..\..\u_Utils\Build\make| exist? Also, what is the System Target File selected ...

12 years ago | 0

Answered
What is mean by "Simulink.logging Info object could not be located because its class can not be found"?
Your model (created in R2010b) is probably using some newer features which were not present in R2007b (an older version). Please...

12 years ago | 0

Answered
I cant make coder in my MATLAB 2013
You need to add the function header at the top of your file to make it a function instead of a script. See <http://www.mathworks...

12 years ago | 0

Answered
Start Simulation via Joystick in Simulink
If you need to start simulation using an external command, that command needs to exist outside of the model, so it cannot be a b...

12 years ago | 0

Answered
how can i to make an erro for mask of simulink?
You can use each parameter's dialog callback to validate it. Please see <http://blogs.mathworks.com/seth/2008/08/13/dynamic-mask...

12 years ago | 0

Answered
Influence When Simulink Executes Custom C-Code
It is in general easier to use the Legacy Code Tool, and perhaps then adjust the generated S-function and TLC if needed, especia...

12 years ago | 0

| accepted

Answered
How can we add a If-action-subsystem to a any model using m-Scripts ?
Please see <http://www.mathworks.com/help/simulink/functionlist.html?s_tid=doc_12b here> for the full list of command-line funct...

12 years ago | 0

| accepted

Answered
How so I send a Structure to the workspace from the Simulink embedded function?
Please see <http://www.mathworks.com/support/solutions/en/data/1-E24ODG/index.html?product=ML&solution=1-E24ODG How can I store ...

12 years ago | 0

Answered
How I can get frequency response from simulink model
See <http://blogs.mathworks.com/seth/2010/02/26/how-to-estimate-the-frequency-response-of-a-simulink-model/ How to Estimate the ...

12 years ago | 0

Answered
How do I call a custom Matlab class method in a Simulink block?
Since you need the MATLAB code to compute the output as a signal, you have the right idea of using a block to call the code. How...

12 years ago | 0

| accepted

Answered
How to have variable-sized output for Simulink MATLAB-function block?
I think this should work as long as you can enforce a maximum size for |y|. Simulink currently does not support dynamic memory a...

12 years ago | 0

| accepted

Answered
how to find the floating scope in simulink model?
You can use |find_system('modelname','BlockType','Scope')| to find all Scopes in a model, but if you are only interested in Floa...

12 years ago | 0

Answered
How to find level-2 s-functions in model?
Try: find_system('test','BlockType','M-S-Function')

12 years ago | 0

| accepted

Answered
How can I use C code generated by Matlab coder?
The second input argument is actually a pointer, if you notice that it's passed in as |real_T c[9]|, which is equivalent to |rea...

12 years ago | 1

| accepted

Answered
how c++ uses the matlab engine in mac os?
Please see <http://www.mathworks.com/help/matlab/matlab_external/compiling-engine-applications-in-an-ide.html Compiling Engine A...

12 years ago | 0

Answered
Automatic generation of S function for a c code
You can use the <http://www.mathworks.com/help/simulink/sfg/integrating-existing-c-functions-into-simulink-models-with-the-legac...

12 years ago | 0

| accepted

Answered
Model Migration from Code to Simulink: The Execution of Matlab Function Blocks
Niel: Don't mean to discourage you, but please post your comments on this thread instead of sending personal messages in reply (...

12 years ago | 1

| accepted

Answered
Auto-Code Generation with 2010b RealTime Workshop
Yes, you do need Stateflow Coder to generate code from Stateflow charts in R2010b or older versions. In R2011a, the Simulink Cod...

12 years ago | 0

| accepted

Answered
How to get matrices from S-function to Simulink?
Firstly, it appears that you are writing a Level-1 S-function, which has been deprecated for several years now. It currently onl...

12 years ago | 0

Answered
How to help Stateflow locate the C-compiler?
Since you are using Microsoft Visual C++ 2012 in R2013a, you might be affected by <http://www.mathworks.com/support/bugreports/9...

12 years ago | 0

Answered
How to display internal signals in a Simulink Model?
I don't think the Scopes actually run when the model is running in Accelerated mode, because Simulink generates a C-MEX S-functi...

12 years ago | 0

| accepted

Answered
A resettable Delay in SIMULINK
You can use a <http://www.mathworks.com/help/simulink/ug/triggered-subsystems.html Triggered Subsystem> to detect the transition...

12 years ago | 1

Answered
Possible to call subfunction in S-function level-2
MATLAB S-functions follow basic programming language rules of MATLAB, so you can certainly call into your external/sub-function ...

12 years ago | 1

| accepted

Answered
how to perform simulation in matlab from c++ code
If you plan to simulate only in MATLAB, a MEX-function is sufficient. C-MEX S-functions are a special category of MEX-files that...

12 years ago | 0

| accepted

Answered
How to initialize variables (parameters) in Simulink
Yes, typically this kind of initialization is done using MATLAB code that is called from the model <http://www.mathworks.com/hel...

12 years ago | 8

Answered
What is the difference between using Data Store Blocks & Delay block to avoid algebraic loop error
Are you using the continuous delay block? If so, yes, I believe it uses the Simulink Solver to perform the delay operation. From...

12 years ago | 0

Answered
S-function documentation that "S-function level-1 supports vector inputs and outputs. DOES NOT support multiple input and output ports".
Is there a reason that you would not like to upgrade to Level-2 S-functions? Level-1 S-functions have been deprecated for severa...

12 years ago | 0

Answered
How to change the device type from Matlab?
You need to pass in the name of the model as the first argument: set_param('modelname', 'ProdHWDeviceType', 'Generic->32-b...

12 years ago | 0

Answered
if statement in embedded function
You can use a |persistent| variable to store the previous value of the input. For example: function [P1,P2]=fcn(L1,L2,S1,S...

12 years ago | 0

| accepted

Load more