Exponential function in Simscape

3 Ansichten (letzte 30 Tage)
Bhavesh Gandhi
Bhavesh Gandhi am 8 Aug. 2018
Beantwortet: Anay am 3 Mär. 2025
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'}

Antworten (1)

Anay
Anay am 3 Mär. 2025
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!

Kategorien

Mehr zu Run-Time Parameters finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by