Edit Code Initialization under Mask editor

조회 수: 12 (최근 30일)
Jack Daniels
Jack Daniels 2025년 1월 7일
이동: Fangjun Jiang 2025년 1월 17일
I am creating the mask for my simulink block and I need to add the Initiallization code to it. Unfortumatelly I can't edit (add) code within the mask editor; it's grayed and not editable, disabled.
How can I access this, and add the initialization code to it?
Thank you.

채택된 답변

Meet
Meet 2025년 1월 8일
편집: Meet 2025년 1월 8일
Hi Jack,
I faced a similar problem and found that there are two ways to save callbacks: either within the mask or in a separate callback file. It is possible that your Mask Editor is set to "Callback file" under "Switch Callback Mode." If you change this setting to "Mask," you should be able to edit the initialization code directly in the editor. I have attached an image to guide you through this process.
I hope this helps resolve the issue!
  댓글 수: 1
Jack Daniels
Jack Daniels 2025년 1월 8일
이동: Fangjun Jiang 2025년 1월 17일
Hello,
I did as you suggested. The code editor is not grayed but still disabled, not accessible and not possible to edit.
then it's neeed to click "+" to start the code edit to be accesibale/editable :)
Thanks for suggestion and point me to the right direction!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Create Block Masks에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by