Replacing specific block with subsystems

조회 수: 1 (최근 30일)
Anubhav Routray
Anubhav Routray 2023년 1월 24일
댓글: Anubhav Routray 2023년 3월 13일
I want to replace all the 'Memoey ' blocks in a model with a subsystem which would have the functionality of 'Memory' block. But the initial condition to the 'Memory' block should be passed from From workspace block as the initial conditions are changed frequently. I have the initial conditions stored in an array. Any help is appreciated. I am using MATLAB 2020a

채택된 답변

Benjamin Thompson
Benjamin Thompson 2023년 1월 24일
Here is one way. I think you would just use a constant block rather than From Workspace because From Workspace is looking to use a time sampled array or table, something like that.
  댓글 수: 5
Benjamin Thompson
Benjamin Thompson 2023년 1월 25일
After the first update, a memory block would make the output equal to input. This is what "initial condition" means. Or you may find that the Delay block is a better behavior, since it should be that output is delayed one step from the current input. You may experiment.
I do not know whether the From Workspace block can do what you want. Here is a link with more information.
Anubhav Routray
Anubhav Routray 2023년 3월 13일
Hi.
Could you please also suggest such a subsystem which would have the functionality of a 'Unit Delay' block?
Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by