MATLAB Answers

解带参数的非线性方程提示无解?

14 views (last 30 days)
毅 字
毅 字 on 19 Sep 2021
Commented: Walter Roberson on 19 Sep 2021
代码如下:
syms x y a b n A omega1 omega2 theta v
eq1=(((x-2*pi*n*v/omega1)*cos(theta)+(A+b/2-y)*sin(theta))/a).^2+(((x-2*pi*n*v/omega1)*sin(theta)-(A+b/2-y)*sin(theta))/b).^2==1;
eq2=y==A*sin(omega2*x);
eq3=tan(theta)==A*omega2*cos(omega2*x);
eq4=tan(theta)==-(b/a).^2*(((x-2*pi*n*v/omega1)*cos(theta)+(A+b/2-y)*sin(theta))/(x-2*pi*n*v/omega1)*sin(theta)-(A+b/2-y)*sin(theta));
[x y theta] = solve(eq1,eq2,eq3,eq4,x,y,theta)
想要求正弦函数曲线与椭圆的交点坐标,用a b n A等参数表示,为啥就解不出来呢?这代码有什么问题吗?
  1 Comment
Walter Roberson
Walter Roberson on 19 Sep 2021
Approximate translation:
"I want to request the coordinates of the intersection point of the sine function curve and the ellipse, expressed with parameters such as a b n A, why can't it be solved? Is there something wrong with this code? "

Sign in to comment.

Accepted Answer

毅 王
毅 王 on 19 Sep 2021
代码没有什么问题执行的时候也没有出错,你再看一下,a换0看看
  1 Comment
Walter Roberson
Walter Roberson on 19 Sep 2021
Approximate translation:
"There is no problem when the code is executed and there is no error. You can take a look again, and change a to 0 to see "

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!