eqn =
Why does my code return 'Empty sym: 0-by-1'?
Show older comments
Currently working through chapter 12 in the third edition of MATLAB for Engineers by Holly Moore. I was trying to replicate example 12.1, which shows how to solve the reaction rate constants equation for Q:
using symbolic variables and the solve equation. After a few tries, I copied the given code word for word but every time I run it, it returns 'Empty sym: 0-by-1' instead of the result the book shows, which is
ans =
-R*T*log(k/k0)
My input is:
syms k0 Q R T
k = k0*exp(-Q/(R*T)) == 0;
Q0 = solve(k,Q)
The book calls for:
X = sym('k = k0*exp(-Q/(R*T))')
solve(X,'Q')
I tried both, but neither returns what it's supposed to as far as I can tell
Accepted Answer
More Answers (0)
Categories
Find more on Numeric Solvers 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!