是否有办法来调整这个系统非线性方程 [英] Is there a way to adjust this system of non linear equation
问题描述
我已经解决了这个问题的最后2天,但没有成功。
说我们有这个制度:
I've been to solve this problem for the last 2 days with no success. say we have this system :
该解决方案具有的无限数量时:
the has an infinite number of solutions when :
获得Theta角度的价值,我用这个公式:
to get value of the angle Theta, I use this formula :
这是我得到的值是正确的,但只在某些点,因为该系统是不可解。
这里是它的样子:
The value that I get is correct but only in some points, because the system isn't solvable. and here is how it looks like :
红色曲线重新presents的必应的价值和蓝色的再presents我居然得到。
the red curve represents the "must be" value and the blue one represents that I actually get.
ploting总和的值后:
after ploting the value of the sum :
这里是我得到:
正如你可以看到它的正弦曲线,这似乎影响角度的必应的价值。
here is what I get : as you can see it's sinus curve, that seems to influence the "must be" value of the angle.
模拟这个我一直在使用这个程序:
to simulate this I've been using this program :
#include <stdio.h>
#include <math.h>
int main (){
float xin =0;
float yin =0;
float zin =0;
float A =0;
float B =0;
float C =0;
float angle =0;
float outangle =0 ;
float angledeg =0;
while (angledeg <=(360*3)) {
angle = angledeg * M_PI/180;
xin = 0.11;
yin = (sin(angle) / sqrt(3)) + xin;
zin = (xin - (sin(angle +(120*M_PI/180))));
A = yin - xin;
B = xin - zin;
C = zin - yin;
outangle = atan2((A*sqrt(3)) , (B -C) ) * 180/M_PI; // 100% correct
printf ("%lf \n" , outangle);
angledeg++;
}
return 0;
}
所以我的问题是:我如何使用总和的值来调整的结果值必应的角度(红色曲线)的值
So my QUESTION is : how could I use the value of sum to adjust the resulted value of "must be" value of the angle ( the red curve)
更新
我不知道这是否使感,但它的工作原理:删除的sqrt(3):
I don't know if this make a sense but it works : Removing sqrt(3) :
yin = (sin(angle) / sqrt(3)) + xin;
我真的不明白这一点,但它工作正常?任何想法,为什么?
I really don't get it, but it works fine ? any idea why ?
推荐答案
您可以极大地考虑简化局面
You can dramatically simplify the situation by considering that
sin(t)+sin(t+120°)+sin(t+240°)=0
这只是意味着在单位圆上的任何等边三角形的(重量)的中心点为原点
which just means that the (weight) center point of any equilateral triangle on the unit circle is the origin.
因此,
sin(t)/sqrt(3)+sin(t+120°)+sin(t+240°)=sin(t)*(1/sqrt(3)-1)
所以 T = THETA
,使系统可以解决的是 T = 0°
和<$唯一值C $ C> T = 180°。
So the only values of t=theta
that make the system solvable are t=0°
and t=180°
.
在计算
y=x+sin(t)/sqrt(3); z=x-sin(t+120°)
你生产作为对C值
you produce as value for C
z-y = - sin(t+120°) - sin(t)/sqrt(3)
和由此
B-C = 2*sin(t+120°) + sin(t)/sqrt(3)
= -sin(t) + sqrt(3)*cos(t) + sin(t)/sqrt(3)
其中某种期待你只想到中期,这对于是真实的罪(T)= 0
,再次为 T = 0°
或 T = 180°
。
这篇关于是否有办法来调整这个系统非线性方程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!