Unexpected behaviour of symbolic substitution
1 回表示 (過去 30 日間)
古いコメントを表示
Hey, If the code attached below is executed, the result shows '\\\nb(t)' somewhere in the expression. I do not know why this happens or what that could mean. The code is not a mimimum example, since this happens only in this case. I am making use of symbolic substitutions in many occations and so far I have not come across problems. The expressions, that are defined (i.e. 'g' and 'h(t)'), seem to be fine (for example when viewed in a MuPAD notebook). Looking forward to any help! Moritz
syms a(t) b(t) c(t) h(t) u1(t) k1 k2 k3
g = diff(a(t), t) == u1(t) + (b(t)*diff(c(t), t, t) - diff(b(t), t)*diff(c(t), t) + k3*b(t)^2*diff(c(t), t))/(k3*b(t)^2) - k1*a(t)*b(t)^2;
h(t) = (2*diff(b(t), t)^2*diff(c(t), t) + b(t)^2*diff(c(t), t, t, t) - 2*b(t)*diff(b(t), t)*diff(c(t), t, t) - b(t)*diff(c(t), t)*diff(b(t), t, t) + k2*b(t)^2*diff(c(t), t, t) + k3*b(t)^3*diff(c(t), t, t) + k2*k3*b(t)^3*diff(c(t), t) - k2*b(t)*diff(b(t), t)*diff(c(t), t))/(k1*k2*k3*b(t)^5);
subs(g, a(t), h(t));
1 件のコメント
John Chilleri
2017 年 9 月 6 日
I ran the above code and did not have the string '\\\nb(t)' in any variable (including ans) (R2015b).
採用された回答
Nicolas Schmit
2017 年 9 月 7 日
\\\n is just a line break. This happens when the formula being displayed is very long. This is just a command to tell a text editor to display the formula on several lines, should you export the results to a text file. This is just a display artefact that you can ignore, it has no impact on the mathematical meaning of your equation.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!