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?

 채택된 답변

VBBV
VBBV 2020년 11월 1일
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개)

질문:

2020년 11월 1일

댓글:

2020년 11월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by