Unexpected output from simplify()

1 回表示 (過去 30 日間)
JingChong Ning
JingChong Ning 2023 年 1 月 25 日
回答済み: Askic V 2023 年 1 月 25 日
I have this code, looking for the derivative of this equation
syms mp dv vc c
expr2 = (1-((c^2)/(vc^2))*(exp(dv/c)-1))/(exp(dv/c))==mp;
simplify(diff(expr2,c))
I am expecting just a simple expression, but the output contains an extra item
c^2*dv - 2*c^3*exp(dv/c) + dv*vc^2 + 2*c^3 == 0 & vc ~= 0
What does the thing after the & sign mean? Why is it here?

採用された回答

Askic V
Askic V 2023 年 1 月 25 日
It is probably because you he a division by vc in your expression.
.../(vc^2)...
This means simplified expression is valid only if vc is different than zero.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFormula Manipulation and Simplification についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by