Differencial equation of eq "without" variables?
1 次查看(过去 30 天)
显示 更早的评论
Good day to all of you,
I would like to ask a question about differencial / derivative (don't know the right "syntax" - not an english native speaking person).
My problem is that I have to do the Diff Eq of bending curve for my thesis but I don't know how to derive that equation if I know everything in it. even the x1 (which is my derivative parameter) I know. It's [0, 2, 4, 6, 8, .. 200] (for example).
If I do it in my paper, it's easy (as shown in the picture) but I don' know how to do it in matlab.
Can anybody help please?
3 个评论
Walter Roberson
2013-4-3
There is no way to "syms all". However, you can put multiple variables on one "syms" line
syms x1 x2 pqr17
回答(1 个)
Walter Roberson
2013-4-3
xvals = 5:.01:7 %for example
syms x
eq = x^2 + x - 5
eq_x = double(subs(eq, x, xvals));
plot(xvals, eq_x);
eq_D = diff(eq, x);
eq_D_x = double( subs(eq_D, x, xvals) );
plot(xvals, eq_D_x);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!