필터 지우기
필터 지우기

How to "Create new data" for a custom library block

조회 수: 2 (최근 30일)
Chuyen
Chuyen 2023년 12월 4일
댓글: Chuyen 2023년 12월 14일
Hello all,
I am creating a custom library block for my project which I followed mask concept as Unit delay block. However, I got some difficulties on creating New data for my state variable. Currently, I can only create a state variable which will be stored in data dictionary by default; however, I would like to create as following Unitdelay concept. But I could not find any documents which introduced how to do these stuffs for custom library block.
Or whether are there any Parameter options available for creating this on Mask Editor? Please give me some hints here. Thank you so much!
  댓글 수: 4
madhan ravi
madhan ravi 2023년 12월 4일
sorry I haven't worked with data dictionary yet, so can"t help you
Chuyen
Chuyen 2023년 12월 5일
편집: Chuyen 2023년 12월 5일
Anyway, thank you for addressing here. I am still finding some sources which introduce that but there is nothing so far. Not sure Mathworks supports to manupilate it programatically.

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

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2023년 12월 5일
편집: Fangjun Jiang 2023년 12월 5일
Create a Mask for your customized library block, then when you double click the block, you will have a dialog to specify that parameter, just like the dialog you got when double click the UnitDelay block. The built-in "three dot action button" always appears on the side. Click the button and you will see the "Create variable" or "ParameterName: Create ..." option.
  댓글 수: 13
Fangjun Jiang
Fangjun Jiang 2023년 12월 13일
For new variables, the model workspace option should always be there.
There is API for model workspace too.
Chuyen
Chuyen 2023년 12월 14일
Thank you so much. I will take a look

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

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by