回答済み
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...

3年弱 前 | 0

| 採用済み

回答済み
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...

3年弱 前 | 0

| 採用済み

質問


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

3年弱 前 | 1 件の回答 | 0

1

回答

回答済み
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...

3年弱 前 | 3

回答済み
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...

3年弱 前 | 0

回答済み
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 ...

3年弱 前 | 0

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

3年弱 前 | 0

回答済み
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 ...

3年弱 前 | 0

回答済み
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...

3年弱 前 | 1

質問


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

3年弱 前 | 1 件の回答 | 0

1

回答

回答済み
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...

3年弱 前 | 0

| 採用済み

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

3年弱 前 | 0

回答済み
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...

3年弱 前 | 0

| 採用済み

回答済み
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...

3年弱 前 | 0

回答済み
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.

3年弱 前 | 0

回答済み
Separate Simulink block name into several lines
Shift + Enter

3年弱 前 | 0

| 採用済み

回答済み
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...

3年弱 前 | 0

回答済み
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...

3年弱 前 | 0

| 採用済み

回答済み
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...

3年弱 前 | 0

回答済み
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...

3年弱 前 | 0

| 採用済み

回答済み
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...

3年弱 前 | 0

回答済み
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 ...

3年弱 前 | 0

回答済み
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...

3年弱 前 | 0

回答済み
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 ...

3年弱 前 | 0

| 採用済み

回答済み
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...

3年弱 前 | 0

回答済み
[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.

3年弱 前 | 1

| 採用済み

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 0

回答済み
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年弱 前 | 1

| 採用済み

さらに読み込む