필터 지우기
필터 지우기

Finding the null gradient

조회 수: 7 (최근 30일)
bh1910
bh1910 2015년 7월 24일
댓글: Star Strider 2015년 7월 25일
Hello, I'm kind of struggling with a problem.
If
syms x y
g = gradient ([x^2 + x, y^2 - y], [x, y])
How can I determine [x, y] which make the gradient vector null?
I tried to use fsolve but couldn't get it to work.
A bit lost here. tks

채택된 답변

Star Strider
Star Strider 2015년 7월 24일
See if this does what you want:
syms x y
f = [x^2 + x, y^2 - y];
g1 = gradient(f(1), [x, y]);
g2 = gradient(f(2), [x, y]);
x0 = solve(g1 == 0)
y0 = solve(g2 == 0)
  댓글 수: 2
bh1910
bh1910 2015년 7월 24일
Tks for your answer.
Star Strider
Star Strider 2015년 7월 25일
My pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Conversion Between Symbolic and Numeric에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by