1-2*cos(al​pha1)+2*co​s(alpha2)-​2*cos(alph​a3); 1-2*cos(5*​alpha1)+2*​cos(5*alph​a2)-2*cos(​5*alpha3) how to solve this nonlinear equation using matlab?by using newton raphson method or fsolve..please help me...

nonlinear equation solve

댓글 수: 1

What equation ? I only see a mathematical expression.
And what is the variable you want to solve for ?
Best wishes
Torsten.

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

답변 (1개)

Walter Roberson
Walter Roberson 2015년 7월 25일
편집: Walter Roberson 2015년 7월 25일
Assuming the system
[1-2*cos(alpha1)+2*cos(alpha2)-2*cos(alpha3), 1-2*cos(5*alpha1)+2*cos(5*alpha2)-2*cos(5*alpha3)]
The system has two trivial roots: alpha1 = pi/3 for all alpha2 and alpha3; and alpha3 = pi/3 for all alpha1 and alpha2. It also has the simple root alpha2 = 2*pi/3 and alpha3 = pi - alpha1 for all alpha1.
There is an additional pair of roots that would take some meaningful searching for and is worth doing an exercise for, but with those other three roots being so simple it is hardly worth bothering.
If you want to try with fsolve then:
fun = @(alpha1, alpha2, alpha3) [1-2*cos(alpha1)+2*cos(alpha2)-2*cos(alpha3), 1-2*cos(5*alpha1)+2*cos(5*alpha2)-2*cos(5*alpha3)];
f3 = @(alpha) fun(alpha(1), alpha(2), alpha(3));
fsolve(f3, rand(1,3))

질문:

2015년 7월 24일

편집:

2015년 7월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by