How do I partial differentiation a function with 2 variables?

My function is P(V,R) = V^2/R.
I know how to find the partial differentiation of the function with respective to V or R.
However, how do I find the partial differentiation of P with the value V=120 and R=2000?
Because I know there is a formula to find the partial differentiation of P.
How do i put it in Matlab?

 采纳的回答

Try this
% if true
% code
% end
v = sym('120')
r = sym('2000')
p = diff(v^2/r)
Since you assign for V, R as constants, the pde will return as 0

1 个评论

so actually, i have dV = 0.02V and dR = 0.03R. i was trying to use the formula dP=(dP/dV)*dV + (dP/dR)*dR. Is there a way to code the formula into matlab?

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by