Differencial equation of eq "without" variables?
1 view (last 30 days)
Show older comments
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 Comments
Walter Roberson
on 3 Apr 2013
There is no way to "syms all". However, you can put multiple variables on one "syms" line
syms x1 x2 pqr17
Answers (1)
Walter Roberson
on 3 Apr 2013
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);
See Also
Categories
Find more on Numbers and Precision 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!