How do i find x in an equation using the solve command?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi everyone,
I use MATLAB R2015a.
Can't solve a x in the matlab even for the simpliest equation like x-2=0. tryed everything.
thank you for your help.
댓글 수: 1
Darshan Sen
2019년 11월 22일
Hello Shimon. What error are you getting? Do you have the Symbolic Math Toolbox add-on?
Here's a thread you might find useful. :)
채택된 답변
Darshan Sen
2019년 11월 22일
Once you have the Symbolic Math Toolbox add-on, you may solve the equation like this
syms x
eqn = x - 2 == 0;
solx = solve(eqn, x)
Hope this helps. :)
댓글 수: 0
추가 답변 (1개)
Erivelton Gualter
2019년 11월 22일
Do you have Symbolic Math Toolbox?
Try the following:
syms x
fcn = x-2;
solve(fcn == 0)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!