Solving Non-linear equations
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi !
I am trying to solve this set of non-linear equations using Matlab ... and i am not getting any solution
they are 3 equations with three variables as follow:
-1.63-10.6*cos(x-z-1.41)-13.2*cos(x-y-1.38)=0
3.42-36*cos(y-z-1.38)-48.8*cos(y-x-1.38)=0
34.1-76.5*cos(z-y-1.38)-83.4*cos(z-x-1.41)=0
I tried fsolve and feval functions but i did not get any answer!!
thanks in advance for help
2 commentaires
Réponses (1)
Matt J
le 5 Août 2015
The code below does a search for the minimum by numerical sampling of x,y,z at 1 degree intervals. It does not find a point that brings F close to zero, indicating that there probably is no solution,
[x,y,z]=ndgrid(single(linspace(-pi,pi,360)));
F1=-1.63-10.6*cos(x-z-1.41)-13.2*cos(x-y-1.38);
F2=3.42-36*cos(y-z-1.38)-48.8*cos(y-x-1.38);
F3=34.1-76.5*cos(z-y-1.38)-83.4*cos(z-x-1.41);
F=abs(F1)+abs(F2)+abs(F3);
[minval,i]=min(F(:));
xyz_min=[x(i),y(i),z(i)],
minval,
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!