do you know the difference between set and set_param

조회 수: 10 (최근 30일)
bo peng
bo peng 2021년 5월 14일
댓글: Julian Hapke 2023년 6월 6일
set
  댓글 수: 1
bo peng
bo peng 2021년 5월 14일
get function can get the parameter of block, get_paramer have the same function, what is the difference of them.
identical, do you know the difference between set and set_param

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

채택된 답변

Steven Lord
Steven Lord 2021년 5월 14일
The set_param function is intended to set parameters of Simulink models and Simulink blocks.
The set function is intended to set properties of certain types of MATLAB objects. Most commonly it is used to set properties of Handle Graphics objects like line handles, axes, and figure windows but class authors can write their classes so users of those classes can interact with them using set and get.
The two functions are not interchangeable as far as I'm aware.
  댓글 수: 3
Paul
Paul 2023년 6월 5일
Can you link to the documentation that shows this usage of set with multiple handles to blocks?
Also, is there a doc page for set_system? I can't find it in my release R2022a.
I'd like to read about both.
Julian Hapke
Julian Hapke 2023년 6월 6일
I don't know any command named set_system. I don't know if using set for Simulink Blocks is documented, I just tried it and it worked. I used it just like I would when dealing with graphic handles: set(array_of_handles, 'Property', Value)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by