Answered
Stateflow outputs a "mux" variable when I want a bus. How can I output a bus or reference specific elements of "mux"?
Have you tried creating a Simulink Bus and then in the Stateflow data editor setting the type of present_state to be the Simulin...

7 years ago | 0

Answered
c file name from grt generated code
Probably the easiest approach is to write a simple MATLAB function that takes as an argument the modelFileName, then uses filepa...

7 years ago | 0

| accepted

Answered
OO code generation from Simulink
If you use Embedded Coder and select C++ code generation, you can get a C++ class for each referenced model in the system. It i...

7 years ago | 0

| accepted

Answered
How to rebuild a referenced model inside a top model
slbuild(<modelRefName>,'ModelReferenceRTWTarget')

7 years ago | 0

Answered
How to run SIL of a model including s-functions based on c++ code
when you used legacy_code tool to create s-function, did you use the legacy_code('rtwmakecfg_generate', specs) option to crea...

7 years ago | 0

Answered
The values of desired_speed and desired_trq are 1 & 99, the typedef is PERCENTAGE which of integer type,but while simulating it is showing fraction values, Is this something to do with the "PERCENTAGE " typedef ?
You have specified PERCENTABE to used fixed point data type. Simulink is showing you the floating point equivalent of the integ...

7 years ago | 1

| accepted

Answered
How to correct the error "Error in default port dimensions function of S-function 'X'. This function does not fully set the dimensions of output port x" under Simulink?
Hi Amin, It looks like Simulink was having trouble inferring the size of the for e_dot, e_doubledot and e_tripledot signals th...

7 years ago | 0

Answered
How to generate S-Function with referenced models
Is the purpose of generating S-Functions to hide the contents of the Simulink model from users? If so, then the best approach f...

7 years ago | 0

Answered
Simulink Linear Analysis Not Available
LInear analysis requires a Simulink Control Design license. Do you have a license for this?

7 years ago | 0

| accepted

Answered
symbol near simulink blocks
The symbols are for linearizing a model using Simulink Control Design. See this link for details.

7 years ago | 1

| accepted

Answered
How to open the Lane following using NMPC example on Matlab R2018a?
This example is not available in R2018a. It is available in R2018b.

7 years ago | 0

| accepted

Answered
Use spreadsheet with datetimes as a source input in simulink.
Try changing the format of the date column in your excel spreadsheet to "general". THis will represet the date as number of day...

7 years ago | 0

Answered
How to print certain block of Simulink model
Rather than trying to locate the block within a larger image, you could simply copy the block into a new model and then take a s...

7 years ago | 0

Answered
Can i check the signals in a Bus ?
One approach would be to create a bus object from the bus creator in your model that creates the bus using the function Simulink...

7 years ago | 0

| accepted

Answered
Why can't Simulink inherit signal sizes?
try adding the following line of code after %#codegen statement. Since idx is an input to your function, Simulink isn't able to...

7 years ago | 0

| accepted

Answered
How to show requirements in generated code for traceability?
Alternately, you can use Simulink Requirements to establish a link between blocks in the Simulink model and cells in the Excel S...

7 years ago | 2

| accepted

Answered
how to programm lcd display with simulink on raspberry pi
The interface to the display is I2C. You'll need to use the I2C Master Read and I2C Master Write blocks that come with the <htt...

7 years ago | 0

| accepted

Answered
How to reorganize blocks programmatically based on another block.
You will need to write MATLAB code that uses find_system() to locate the subsystem, inports and outports, and then get_param(gcb...

7 years ago | 0

Answered
Initializing discrete states with Matlab functions
If you have a newer version of MATLAB, you can place your MATLAB Function block in a Simulink Initialize Function block as descr...

7 years ago | 0

| accepted

Answered
Scripted make_rtw fails with "Not enough input arguments"
I recommend using documented functions rtwbuild() or slbuild() to generate code from your Simulink model.

7 years ago | 0

Answered
How to run simulation and harware simultaneously
This can be done with external mode. It is a standard feature of <https://www.mathworks.com/help/xpc/ug/animate-stateflow-chart...

7 years ago | 0

Answered
How can I migrate a model reference hierarchy to use a common data dictionary programatically?
use mdlList = find_mdlrefs(modelName); for i=1:numel(mdlList) set_param(mdlList{i},'DataDictionary',dictionaryName); ...

7 years ago | 0

Answered
Difference between signal passed to Simulink and immediately logged
Is the "interpolate data" option set for the "from workspace" block? I am guessing there are slight nuerical differences betwee...

7 years ago | 1

Answered
How to properly generate s-functions for functions from a static library?
Use the <https://www.mathworks.com/help/simulink/sfg/integrating-existing-c-functions-into-simulink-models-with-the-legacy-code-...

7 years ago | 1

Answered
Simulink not respecting the sampling time
Do you have Simulink connected directly to the device? Simulink is not a real-time program. It will run the simulation as fast...

7 years ago | 0

Answered
Why is existing mex file getting deleted while compiling the model?
Simulink will generate a new mex file for the stateflow block when it detects a change to the model. This ensures that the mex ...

7 years ago | 0

Answered
Struggling with DDS Blockset Environment
What is the error message on the machines that don't work?

7 years ago | 0

Answered
Simulink throws error when using multi-rate blocks for concurrent execution
The signal feeding the Upsample block is running at a slower rate that the output of the Upsample block. When you set "Allow ta...

7 years ago | 0

| accepted

Answered
Hi, I´m working with simulink and the Tarjet TMS320F28377S and i want to program a bus can protocol, and the problem its in the dimension of the blocks, can you help me please
All can messages have 8 bytes of data. Since you specified the output data type of the eCAN RCV block to be unit32 ( which is 4...

8 years ago | 0

| accepted

Answered
Simulink throws error when using multi-rate blocks for concurrent execution
Model will not update. What values are you using for the various parameters in the model?

8 years ago | 0

Load more