필터 지우기
필터 지우기

How to create user-defined unit in SimBiology?

조회 수: 4 (최근 30일)
日曜
日曜 2024년 1월 23일
댓글: 日曜 2024년 1월 24일
When I planned to run a SimBiology case model, SimBiology told me that the "cell" unit does not exist. I tried to use sbiounit to define the user-created unit, but an error occured when running the code. How can I make the Model Builder recognize this unit? Is there any way to do it directly in the SimBiology interface (e.g., Unit manager)?

채택된 답변

Jeremy Huard
Jeremy Huard 2024년 1월 24일
I suspect you receive an error when executing the sbioaddtolibrary command because the sbiounit call does not include any unit composition. Is it correct?
When defining a new unit, you will need to define its composition using other existing units. For example 1 cell=1 item.
Executing this code in MATLAB's command window will remove the error seen in Model Builder:
unitObject = sbiounit('cell','item',1);
sbioaddtolibrary(unitObject);
Alternatively, you can manage custom units in the Libraries panel accessible from the Model Builder App:
Best regards,
Jérémy
  댓글 수: 1
日曜
日曜 2024년 1월 24일
Yeah. It works! Thanks for your suggestion!

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

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  SimBiology Community

카테고리

Help CenterFile Exchange에서 Extend Modeling Environment에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by