Solve a numerical equation

조회 수: 1 (최근 30일)
yinki23
yinki23 2019년 1월 28일
답변: Torsten 2019년 1월 28일
Hi everyone,
I have a problem solving a numerical equation. I want the result near zero for:
((1/6)*abs(sin(x*6/2)/sin(x/2))) = 1/sqrt(2)
It should be around x = 0.4695;
I tried the following:
myfunc = @(x) ((1/6)*abs(sin(x*6/2)/sin(x/2)))-1/sqrt(2);
x0 = 0;
fzero(myfunc,x0);
But somehow doesn't work for me. Can somebody help me please and tell me why it doesn't work?
Thanks.

채택된 답변

Stephan
Stephan 2019년 1월 28일
Hi,
use another x0:
myfunc = @(x) ((1/6)*abs(sin(x*6/2)/sin(x/2)))-1/sqrt(2);
x0 = 1;
fzero(myfunc,x0);
This will make it work.
Best regards
Stephan

추가 답변 (2개)

madhan ravi
madhan ravi 2019년 1월 28일

Torsten
Torsten 2019년 1월 28일
x0 = 0 leads to a divison by zero since sin(x0/2) = sin(0) = 0

카테고리

Help CenterFile Exchange에서 Numeric Solvers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by