Two equations of two unknown angles
Ältere Kommentare anzeigen
If I have:
A = 87; B = 65; C = 73; D = 92;
And the two equations are:
D*sin(200)+A*sin(x)+B*sin(y)=0;73+D*cos(200)+A*cos(x)+B*cos(y)=0
How do I write a code to find x and y?
What is the solution to this error?

2 Kommentare
Walter Roberson
am 23 Feb. 2021
not eq space and then [list] but eq = and then the list
Ravi N
am 23 Feb. 2021
Akzeptierte Antwort
Weitere Antworten (1)
David Hill
am 23 Feb. 2021
fun = @solution;
x0 = [0,0];
I = fsolve(fun,x0);%solution
function f = solution(x)
A=87;B=65;D=92;
f(1)=D*sin(200)+A*sin(x(1))+B*sin(x(2));
f(2)=73+D*cos(200)+A*cos(x(1))+B*cos(x(2));
end
1 Kommentar
Ravi N
am 23 Feb. 2021
Kategorien
Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

