Community Profile

photo

Jonas


Last seen: Today Active since 2019

Statistics

  • 12 Month Streak
  • Thankful Level 2
  • Knowledgeable Level 3
  • First Review
  • Revival Level 1
  • First Answer

View badges

Content Feed

View by

Answered
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...

7 days ago | 0

| accepted

Answered
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...

15 days ago | 0

| accepted

Question


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....

15 days ago | 1 answer | 0

1

answer

Answered
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...

15 days ago | 0

Answered
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...

16 days ago | 0

Answered
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 ...

16 days ago | 0

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

17 days ago | 0

Answered
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 ...

20 days ago | 0

Answered
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...

28 days ago | 1

Question


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...

29 days ago | 1 answer | 0

1

answer

Answered
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...

30 days ago | 0

| accepted

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

1 month ago | 0

Answered
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...

1 month ago | 0

| accepted

Answered
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...

1 month ago | 0

Answered
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.

1 month ago | 0

Answered
Separate Simulink block name into several lines
Shift + Enter

1 month ago | 0

| accepted

Answered
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...

1 month ago | 0

Answered
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...

2 months ago | 0

| accepted

Answered
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...

2 months ago | 0

Answered
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...

2 months ago | 0

| accepted

Answered
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...

2 months ago | 0

Answered
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 ...

2 months ago | 0

Answered
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...

2 months ago | 0

Answered
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 ...

2 months ago | 0

| accepted

Answered
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...

2 months ago | 0

Answered
[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.

2 months ago | 1

| accepted

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

3 months ago | 0

Answered
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...

3 months ago | 0

Answered
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.

3 months ago | 0

Answered
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.

3 months ago | 1

| accepted

Load more