why solve function does not return answer?

조회 수: 3(최근 30일)
WAYNE ONG
WAYNE ONG 2021년 11월 6일
댓글: WAYNE ONG 2021년 11월 6일
syms b
eq1 = 1/tan(b);
sol=solve(eq1)
sol = Empty sym: 0-by-1
the equation above should give answer pi/2 or pi/2+n*pi
but solve doesnt give the answer...
What is the problem with my code?

답변(1개)

VBBV
VBBV 2021년 11월 6일
syms b
eq1 = 1/tan(b)== 4;% example
sol=solve(eq1,b)
Solves uses an equation.
  댓글 수: 1
WAYNE ONG
WAYNE ONG 2021년 11월 6일
hi, i wanted to solve for 1/tan(b)== 0
and expected an answer of pi/2
but solver gives "Empty sym: 0-by-1" instead.
How can i change my code to get the solution?
syms b
eq1 = 1/tan(b)== 0;
sol=solve(eq1,b)
sol = Empty sym: 0-by-1

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by