Exponential function in Simscape

3 ビュー (過去 30 日間)
Bhavesh Gandhi
Bhavesh Gandhi 2018 年 8 月 8 日
回答済み: Anay 2025 年 3 月 3 日
I wanted to know how can I input an exponential function in simscape syntax. When I tried to enter exp(-Ea/(R*Tc)) I got the following error message: No matching signature found for exp. exp takes one dimensionless argument. Argument 1 = {[1x1 double], 's^2*mol*J/m^2/kg/K^2'} Ea = {[1x1 double], 'J'} R = {8.3140, 'm^2*kg*K/s^2/mol'} Tc = {[1x1 double], 'K'}

回答 (1 件)

Anay
Anay 2025 年 3 月 3 日
Hi Bhavesh,
The likely cause of the error is that the “exp” function expects dimension-less input. From the error message you provided, it seems that your unit of the gas constant (R) does not align with unit of “Ea” which is making the result of “-Ea / (R * Tc)” to have some dimension. Make sure that the units of Ea and R align to make it work. You may consider expressing Ea in “J/mol” and R in “m^2*kg/s^2/K/mol”. This will make sure that result of “-Ea / (R * Tc)” is dimensionless and then you can pass it to the “exp” function as argument.
I hope this solves the problem!

カテゴリ

Help Center および File ExchangeRun-Time Parameters についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by