error in gradient function for partial differential

조회 수: 1 (최근 30일)
ahmed ashiry
ahmed ashiry 2015년 3월 1일
편집: ahmed ashiry 2015년 3월 1일
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