Question for directional derivative.
13 ビュー (過去 30 日間)
古いコメントを表示
How to solve the following question in matlab?
u(x1,x2) = x1^2 - x2^2. Calculate the derivative of u in the direction n = (8,-8) at the point (1,1).
0 件のコメント
回答 (1 件)
KSSV
2020 年 10 月 28 日
u = @(x1,x2) x1^2-x2^2 ;
% derivatives at point (1, 1)
x1 = 1 ; x2 = 1 ;
% derivatives
dudx1 = 2*x1 ;
dudx2 = -2*x2 ;
dudx = [dudx1 dudx2] ;
% directional derivative along (8,-8)
v = [8 -8] ;
uv = v/norm(v) ;
iwant = dudx.*uv
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!