error in gradient function for partial differential

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)
the function send to me to solve this equation was gradient but when trying it an error was happened
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)
is
error
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) ??? Error using ==> zeros Trailing string input must be a valid numeric class name.
Error in ==> gradient at 64 g = zeros(size(f),class(f)); % case of singleton dimension

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by