Exponential function in Simscape
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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'}
0 commentaires
Réponses (1)
Anay
le 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!
0 commentaires
Voir également
Catégories
En savoir plus sur Run-Time Parameters dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!