Error using / .

2 views (last 30 days)
jay jay
jay jay on 8 Dec 2022
Answered: Torsten on 8 Dec 2022
Problem with / when I run the code.
k= k0*e^(-Q/RT)
k = k0 * exp((-Q)/(R*T))

Answers (1)

Torsten
Torsten on 8 Dec 2022
If T is an array of multiple temperatures, you have to use elementwise division:
k = k0 * exp((-Q) ./ (R*T))
instead of
k = k0 * exp((-Q)/(R*T))

Categories

Find more on Operators and Elementary Operations 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!