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 日

0 投票

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 件のコメント

Kevin Lee
Kevin Lee 2020 年 11 月 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