필터 지우기
필터 지우기

How to generate a series of output from a function block ?

조회 수: 1 (최근 30일)
Vivek T S
Vivek T S 2023년 5월 29일
답변: Nithin Kumar 2023년 6월 6일
hi,
is it poosible to generate a series of output from a function block in simulink from a single input read?
the module takes an input A and generates output B0,B1,B2 as a series.I need to load these values one by one onto a connection wire between blocks(something similar to an unbuffer works).
thanks

답변 (1개)

Nithin Kumar
Nithin Kumar 2023년 6월 6일
Hi Vivek,
Yes, it is possible to generate multiple outputs from a function block in Simulink from a single input with the following steps.
  • Create a Simulink model.
  • Add a Function block and double-click to open it.
  • In the Function block window, enter the function you defined.
  • In the inputs section, add the input to the function.
  • In the outputs section, add the outputs for the function.
  • Add a Memory block to store the input value.
  • Connect the input signal to the Memory block.
  • Connect the output of the Memory block to the input of the Function block.
  • In the Function block window, write the logic to generate the series of outputs based on the input value and the output from the previous iteration.
  • Connect the outputs of the Function block to the desired output signals.
  • Save and run the model.
By using the Memory block to store the input value and the outputs generated by the Function block, you can implement the logic to generate the subsequent outputs from the previous output values.
For more information regarding the memory block, kindly refer to the following documentation.
I hope this answer helps you.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by