Respondida
Size mismatch when i am using simulink
You have an input named 'u' and an output named 'u', with different sizes. On line 9, the compiler thinks you are assigning the...

casi 3 años hace | 0

| aceptada

Respondida
S-function is eliminated through code optimization
One solution is to create a Simulink.Parameter object with the value of the index, and Storage Class Const. Then use the paramet...

casi 3 años hace | 0

| aceptada

Pregunta


S-function is eliminated through code optimization
Hi all I want to create an S-function by using the S-function Builder to generate a wrapper function which calls external code....

casi 3 años hace | 1 respuesta | 0

1

respuesta

Respondida
Branch wires in Simulink
You can branch a wire by holding the ctrl key and then click and drag. For this particular case, you could also add a second El...

casi 3 años hace | 3

Respondida
How to keep a boolean true value once it has been reached?
Use the Boolean signal to trigger a Triggered Subsystem which triggers on rising edge, which contains a Constant 'true' which co...

casi 3 años hace | 0

Respondida
Why do I receive a warning on bus-capable blocks + matlab function from r2017 and not before?
I get no warnings when running your model or searching objects. Maybe it is related to the fact that you create the Bus object ...

casi 3 años hace | 0

Respondida
Implementing While loop in Simulink
https://nl.mathworks.com/help/ecoder/ug/while-loop.html The documentation demonstrates the While Iterator subsystem and alter...

casi 3 años hace | 0

Respondida
How can I solve this matrix problem?
Use a for-loop which goes from 1:n over the two dimensions, and use an if-statement to write a 1 and an else statement to write ...

casi 3 años hace | 0

Respondida
Stretch an For-Iterator Subsystem over multiple timesteps
That is not possible within the functionality of a for-loop (which is what a For-Iterator is). If it would be possible, the exec...

casi 3 años hace | 1

Pregunta


Create Variant object based on Configuration Reference
Hi all I have a structure of models and model references, which all use the very same Configuration Reference object as their C...

casi 3 años hace | 1 respuesta | 0

1

respuesta

Respondida
Persistent Data in Stateflow
Variables you define as 'local' or as 'output' in the chart are persistent over chart executions. They will take on their initi...

casi 3 años hace | 0

| aceptada

Respondida
MATLAB function block initialization problem.
Define your variable as being persistent, to remember its value across executions. Also, add logic that writes an initialisatio...

casi 3 años hace | 0

Respondida
Can I decouple a time-consuming Simulink function block or Function-call subsystem from Simulink fundamental sample time?
You need a background task to put those heavy calculations inside. Depends heavily on your target if it will be easy or hard to...

casi 3 años hace | 0

| aceptada

Respondida
How to exchange data between Simulink model and App Designer when run in EXTERNAL MODE?
Does this example learn anything? openExample('SlrtAddAppDesignerAppToInvertedPendulumModelExample'); app = slrt_ex_pendulumAp...

casi 3 años hace | 0

Respondida
How can i fix this error?
Delete the mentioned file. It is just a cache file which is not necessary. Otherwise, maybe boot MATLAB in Administrator mode.

casi 3 años hace | 0

Respondida
Separate Simulink block name into several lines
Shift + Enter

casi 3 años hace | 0

| aceptada

Respondida
curren value of signal in scope
It is not possible with the Scope block. As you found out, you can only find the value on a vertical cursor of one signal at a t...

casi 3 años hace | 0

Respondida
constant compare only drives one reset
The root-cause is because the Delay block is Direct Feedthrough. This means that it processes its inputs and directly sets the n...

casi 3 años hace | 0

| aceptada

Respondida
Changing function packaging of Simulink Functions to inlined
I have the same question. I want to inline a Simulink Function, but the option is disabled. However, when integrating a Simulink...

casi 3 años hace | 0

Respondida
How to count how many times a state is visited?
Write the following inside state A: en: counter = counter + 1; and initialise counter = 0. The counter will be incremented on...

casi 3 años hace | 0

| aceptada

Respondida
Best Practices for Simulink Simulation to Embedded Code
The text book way of working is to develop your controller inside a separate Simulink model file, and then using a simulation ha...

casi 3 años hace | 0

Respondida
How to find a ratio of a current value of signal to its previous value in Simulink?
Use Unit Delay block to store the previous signal value. Use Divide block to take the division of the signal and the output of ...

casi 3 años hace | 0

Respondida
how to use a vector output from a certain block as an input for if block, or is it possible?
So you have been posting this same question four times now in one form or another, but still it is not clear. What are those 2x...

casi 3 años hace | 0

Respondida
How to determine a Stateflow sequence?
https://nl.mathworks.com/help/stateflow/ug/about-active-state-data.html In the Model Explorer, for your Stateflow chart, check ...

casi 3 años hace | 0

| aceptada

Respondida
Simulink wire color based on signal value?
No. But you can preprocess the signal by multiplying it with a logical signal, which would be true when the signal is >0 for exa...

casi 3 años hace | 0

Respondida
[Simulink] How can I specify to start a matlab embedded function's execution only when receiving a specific signal ?
Put the MATLAB Function inside an Enabled Subsystem.

alrededor de 3 años hace | 1

| aceptada

Respondida
My main folder is not generated during code generation of simulink model
Did you check 'Generate an example main program' under Code Generation > Templates?

alrededor de 3 años hace | 0

Respondida
where is function block parameters:fcn that expression ex) sin(u(1))+cos(u(1))
Apparently the Fcn block is now considered obsolete and not recommended for usage, see its documentation. It has been removed fr...

alrededor de 3 años hace | 0

Respondida
Plotting a signal with XY Graph (Simulink)
Send a Sinewave signal through a Relay block and plot the two signals using a XY Scope block.

alrededor de 3 años hace | 0

Respondida
Trying to create a controller to maintain a certain speed
Use a PI-controller which receives 60MPH as setpoint and receives the actual speed, which controls the engine torque.

alrededor de 3 años hace | 1

| aceptada

Cargar más