eqn =
Why does my code return 'Empty sym: 0-by-1'?
古いコメントを表示
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
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Numeric Solvers についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!