how to define a variable as a function of another variable in symbolic toolbox
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi I am just wondering whether is it possible to do following: define a variable as a function of x
u=f(x)
Then,
d/dx (u*x) = u'x + xu'
u' is first derivative of u w.r.t. x.
Is this possible to do using matlab symbolic toolbox?
2 Kommentare
Star Strider
am 6 Okt. 2014
You need to set it up correctly:
syms f(x) u(x)
ddx = diff(u*f,x)
—>
ddx(x) =
D(f)(x)*u(x) + f(x)*D(u)(x)
Antworten (1)
Azzi Abdelmalek
am 5 Okt. 2014
syms x u
u=cos(x)
y=u*x
out=diff(y,x)
3 Kommentare
Star Strider
am 6 Okt. 2014
You need to set it up correctly:
syms f(x) u(x)
ddx = diff(u*f,x)
—>
ddx(x) =
D(f)(x)*u(x) + f(x)*D(u)(x)
Siehe auch
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!