How to create user-defined unit in SimBiology?

1 Ansicht (letzte 30 Tage)
日曜
日曜 am 23 Jan. 2024
Kommentiert: 日曜 am 24 Jan. 2024
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)?

Akzeptierte Antwort

Jeremy Huard
Jeremy Huard am 24 Jan. 2024
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

Weitere Antworten (0)

Communitys

Weitere Antworten in  SimBiology Community

Kategorien

Mehr zu Extend Modeling Environment finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by