error in running a SMBL file with SimBiology

1 回表示 (過去 30 日間)
Youngjae You
Youngjae You 2023 年 5 月 5 日
編集済み: Jeremy Huard 2023 年 5 月 8 日
I'm trying to run this model with SimBiology but see an error message.
BIOMD0000000268_url.xml
SBML L2V4 representation of Reed2008_Glutathione_Metabolism
"piecewise" is a function in matlab but it seems SimBiology model bulider recognizes it as a variable... Any idea?
---------
RULE
Aminoacid_input = piecewise(breakfast,and(le(7,daytime),le(daytime,10)),lunch,and(le(12,daytime),le(daytime,15)),dinner,and(le(18,daytime),le(daytime,21)),fasting)
error message: "Rule include varaibles that are unidentified." with red higllight for "piecewise"
---------------------------------

回答 (1 件)

Jeremy Huard
Jeremy Huard 2023 年 5 月 5 日
編集済み: Jeremy Huard 2023 年 5 月 8 日
the piecewise.m file will need to be either in the Current folder or anywhere on your MATLAB Path for SimBiology to use it.
Please note that there is a piecewise function in the Symbolic Math Toolbox but it only supports symbolic variables and will not work in this case.
In case you need a definition of the piecewise function, you could use the one attached.
Best,
Jérémy
  1 件のコメント
Youngjae You
Youngjae You 2023 年 5 月 5 日
That worked. Thanks Jeremy!

サインインしてコメントする。

コミュニティ

その他の回答  SimBiology コミュニティ

カテゴリ

Help Center および File ExchangeExtend Modeling Environment についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by