How can I solve these six trigonometric equations?

1 visualización (últimos 30 días)
Mert ORTLEK
Mert ORTLEK el 7 de Jun. de 2020
Editada: Matt J el 8 de Jun. de 2020
a=70.71;
b=1050;
c=300;
d=260;
e=715.8;
f1=510;
g=380;
h=290;
i=650;
j=46.96;
k=775.1;
l=90.67;
m=324.1;
n=606.4;
o=379.8;
for q=pi/180:pi/180:2*pi
f=@(b)[a*cos(q)+b*cos(b(1))-k-l-c*cos(b(3))
j+a*sin(q)+b*sin(b(1))-m-c*sin(b(3))
l+(c+d)*cos(b(3))+e*cos(b(6))-i*cos(b(2))-h*cos(b(4))
m+(c+d)*sin(b(3))+e*sin(b(6))-i*sin(b(2))-h*sin(b(4))
l+n+f1*cos(b(5))-i*cos(b(2))-(g+h)*cos(b(4))
a+f1*sin(b(5))-i*sin(b(2))-(g+h)*sin(b(4))];
B0 = rand(6,1)*2*pi;
[B,fv,xf,ops] = fsolve(f, B0);
ps = ['theta1'; 'theta2'; 'theta3'; 'theta4'; 'theta5'; 'theta6'];
fprintf(1, '\n\tParameters:\n')
for k1 = 1:length(B)
fprintf(1, '\t\t%s = % .4f\n', ps(k1,:), B(k1))
end
end
  1 comentario
Matt J
Matt J el 8 de Jun. de 2020
Editada: Matt J el 8 de Jun. de 2020
What is wrong with your current method? The code runs for me without error messages.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by