partial differential for nonlinear equation

1 Ansicht (letzte 30 Tage)
ahmed ashiry
ahmed ashiry am 1 Mär. 2015
Kommentiert: ahmed ashiry am 1 Mär. 2015
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)

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 1 Mär. 2015
Bearbeitet: Mischa Kim am 1 Mär. 2015
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 Kommentare
Mischa Kim
Mischa Kim am 1 Mär. 2015
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 am 1 Mär. 2015
thanks for your reply > but i want the version of you matlab to solve the above function gradient

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Particle & Nuclear Physics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by