partial differential for nonlinear equation

1 次查看(过去 30 天)
i want the partial differential of this equation w.r.t X , Y and Z
31.65951=sqrt((20460991.052399-X)^2+(11012393.207537-Y)^2+(13140061.841029-Z)^2)-sqrt((20462649.31-X)^2+(11012196.356-Y)^2+(13137623.266-Z)^2)

采纳的回答

Mischa Kim
Mischa Kim 2015-3-1
编辑:Mischa Kim 2015-3-1
Use gradient
syms X Y Z
Eq = -31.65951 + sqrt((20460991.052399-X)^2+(11012393.207537-Y)^2+(13140061.841029-Z)^2)-sqrt((20462649.31- X)^2+(11012196.356-Y)^2+(13137623.266-Z)^2);
gradient(Eq)
ans =
(2*X - 5492455463362645/134217728)/(2*((Z - 3527258492164819/268435456)^2 + (X - 5492455463362645/268435456)^2 + (Y - 2956116792316497/268435456)^2)^(1/2)) - (2*X - 5492900598497935/134217728)/(2*((Z - 7053207784329839/536870912)^2 + (X - 5492900598497935/268435456)^2 + (Y - 5912127900768797/536870912)^2)^(1/2))
(2*Y - 2956116792316497/134217728)/(2*((Z - 3527258492164819/268435456)^2 + (X - 5492455463362645/268435456)^2 + (Y - 2956116792316497/268435456)^2)^(1/2)) - (2*Y - 5912127900768797/268435456)/(2*((Z - 7053207784329839/536870912)^2 + (X - 5492900598497935/268435456)^2 + (Y - 5912127900768797/536870912)^2)^(1/2))
(2*Z - 3527258492164819/134217728)/(2*((Z - 3527258492164819/268435456)^2 + (X - 5492455463362645/268435456)^2 + (Y - 2956116792316497/268435456)^2)^(1/2)) - (2*Z - 7053207784329839/268435456)/(2*((Z - 7053207784329839/536870912)^2 + (X - 5492900598497935/268435456)^2 + (Y - 5912127900768797/536870912)^2)^(1/2))
  3 个评论
Mischa Kim
Mischa Kim 2015-3-1
Ahmed, how are you running these lines of code? Within a script/function?
Can you get it to run in the MATLAB command window?
ahmed ashiry
ahmed ashiry 2015-3-1
thanks for your reply > but i want the version of you matlab to solve the above function gradient

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Particle & Nuclear Physics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by