Answered
TLC code generation from block parameters as defines
I think that should be: #define ACC_LIMIT_THRESHOULD %<block_parameter_value> and not: #define ACC_LIMIT_THRESHOU...

12 years ago | 1

Answered
How to search for a specific outport data type when set to Inherited ?
I think you should be able to do this using the Simulink command-line API in a MATLAB script. You can use the following commands...

12 years ago | 0

Answered
How to specify initial states for simulink model in structured format?
You can use <http://www.mathworks.com/help/simulink/slref/simulink.blockdiagram.getinitialstate.html Simulink.BlockDiagram.getIn...

12 years ago | 1

Answered
Simulink code generation - turning off a subsystem
You could use <http://www.mathworks.com/help/simulink/slref/variantsubsystem.html Variant subsystems> with the other variant bei...

12 years ago | 1

Answered
How to call dll from GUI????
I presume that this is a follow-up question from your (colleague's previous question) <http://www.mathworks.com/matlabcentral/an...

12 years ago | 0

Answered
How can I highlight reference model with one color and port(port is present in same reference model ) with some other color using script.
All blocks have the <http://www.mathworks.com/help/simulink/slref/common-block-parameters.html BackgroundColor> property, so you...

12 years ago | 1

| accepted

Answered
Does Embedded coder require Simulink ?
The Embedded Coder product is an add-on to Simulink, in the sense that it generates code for embedded processors from Simulink m...

12 years ago | 0

| accepted

Answered
S-function 2 dimension Dwork?
No, AFAIK, S-function DWorks can only be vectors (1-D). Why not simply reshape the matrix to a vector and vice versa?

12 years ago | 0

| accepted

Answered
Converting simulink blocks to code for a GUI?
Since you'd like to execute the GUI as if it were a block, it might be best to create a custom block that opens up and reads fro...

12 years ago | 0

Answered
Error using legacy_code (doubleIt Example)
The <http://www.mathworks.com/help/simulink/sfg/example-using-s-functions-to-incorporate-legacy-c-code.html documentation> uses ...

12 years ago | 1

| accepted

Answered
how to interface c-code generated by simulink coder with external hardware such as microcontroller
Unless you can find a custom Simulink driver blocks library for your hardware (see <http://www.mathworks.com/hardware-support/ho...

12 years ago | 1

Answered
Why I couldn't create mex function that realize C function that call multiple functions in multiple files?
It appears that this is code generated using MATLAB Coder - is this correct? If yes, it appears the generated code is meant to b...

12 years ago | 1

| accepted

Answered
how to use embedded matlab function, or any related block to call a written program in simulink
You can use the <http://www.mathworks.com/help/simulink/slref/interpretedmatlabfunction.html Interpreted MATLAB Function> block ...

12 years ago | 0

Answered
How to know, in a MatLab GUI, if the simulation in Simulink is over?
I think |get_param('modelname', 'SimulationStatus')| would return |stopped| when the simulation is over. I'm not sure what the b...

12 years ago | 0

Answered
Pausing Simulink from Matlab to change control gains
Yes, |gcs| refers to the currently open system (could also be a subsystem). You can use |bdroot| if you only want to refer to th...

12 years ago | 0

Answered
Accessing the State of a Simulink Memory Block
From what I understand, the Memory block is so designed that it's state cannot be accessed/logged. I believe you need to use the...

12 years ago | 0

| accepted

Answered
S-Function & Hardware Interface
There is no limit on what C-functions you can use in your C-MEX S-functions, as long as the code is ANSI-C compatible. You just ...

12 years ago | 0

Answered
Using function handles from *.m file in simulink model
I believe the (Embedded) MATLAB Function block started supporting function handles only in R2007b, so you will only be able to u...

12 years ago | 0

Answered
How to search .slx files (or convert them to text)
You should be able to use <http://www.mathworks.com/help/simulink/slref/save_system.html save_system> to resave a model in the ....

12 years ago | 0

Answered
Manuals or Tutorials for xpc Target running on Simulink 2013a?
You can find links to the latest documentation and videos/examples from the <http://www.mathworks.com/products/xpctarget/ xPC Ta...

12 years ago | 0

Answered
S-Function - share complex variable between method functions
If you are writing a C-MEX S-function, you can do this using a PWork vector. Please see the following links for help: * <http...

12 years ago | 0

Answered
Add line between blocks using handles
Instead of using |gcbh|, please use the return argument of |add_block|, which will be the handle to the newly created block. To ...

12 years ago | 1

Answered
How to make parameters to referenced models non-tunable to avoid the following error: "Model arguments can not be used in non-tunable expressions"?
Did you mean to ask "How can I set the parameters as *tunable* so I can use the masked parameters within the referenced model?" ...

12 years ago | 1

| accepted

Answered
How can m-file neglect the error "There maybe a singularity in the solution" , produced by Simulink, and does not stop?
How about using <http://www.mathworks.com/help/matlab/ref/try.html try/catch> to catch and ignore the exception thrown by the SI...

12 years ago | 0

Answered
How to write tlc file for Level 2 M file S function
You have been asking the same question over and over again: * http://www.mathworks.com/matlabcentral/answers/73660-writing-tl...

12 years ago | 0

Answered
Implementing a complex function in Simulink
The only other alternative I can think of is to use the <http://www.mathworks.com/help/simulink/slref/matlabfunction.html MATLAB...

12 years ago | 0

| accepted

Answered
writing tlc file for level 2 m file s function which accessing guidata
Yes, your TLC code looks right to me, except that you need to add a semicolon to the end of the line "%<y>=%<out>" as required b...

13 years ago | 1

Answered
I2C object creation in Simulink
The MATLAB Function block always generates C-code from the MATLAB code for faster execution. If you intend to run the block only...

13 years ago | 0

| accepted

Answered
It is possible to generate tlc file for Level 2 M file S function using Legacy code?
No, the Legacy Code Tool is meant to generate C-MEX S-functions and corresponding TLC files for them. The "legacy code" being in...

13 years ago | 0

Answered
How can I vary function input matrix size in coder (mexing)? I have used 'Make Sizes Variable' option but this doesn't seem to work.
The size that you set for a variable-size input - [10x3] - is supposed to specify the maximum-size of that input. You may want t...

13 years ago | 0

Load more