Exponential function in Simscape

3 views (last 30 days)
Bhavesh Gandhi
Bhavesh Gandhi on 8 Aug 2018
Answered: Anay on 3 Mar 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'}

Answers (1)

Anay
Anay on 3 Mar 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!

Categories

Find more on Run-Time Parameters in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!