matlab 带入数值,matlab怎么带入一堆数值?

t=[0:0.1:2*pi];

x2= (320.*cos(t).^2 + 320.*sin(t).^2 - (sin(t).*(55.*sin(t) - 4.*cos(t).*(-(25.*(64.*cos(t).^2 + 64.*sin(t).^2 - 1).*(64.*cos(t).^2 + 64.*sin(t).^2 - 121))./16).^(1/2) + 320.*sin(t).^3 + 320.*cos(t).^2.*sin(t)))./(cos(t).^2 + sin(t).^2) + 55)./(8.*cos(t));

y2=(55.*sin(t) + 4.*cos(t).*(-((64.*cos(t).^2 + 64.*sin(t).^2 - 121).*(1600.*cos(t).^2 + 1600.*sin(t).^2 - 25))./16).^(0.5) + 320.*sin(t).^3 + 320.*cos(t).^2.*sin(t))./(8.*cos(t).^2 + 8.*sin(t).^2);

y3=(3925.*y2 - (12188224018053065.*x2)./2199023255552 + 24000.*(((6570214509731731.*x2.^3)./68719476736 - (3900231685776981.*x2.^3.*y2)./4398046511104 - 444.*x2.^4 + 68.*x2.^2.*y2.^2 + 142560.*x2.^2.*y2 - 6811425.*x2.^2 - (5179995207672553.*x2.*y2.^2)./549755813888 - (7498614386106867.*x2.*y2)./1073741824 + (661280917803823.*x2)./4194304 + 326400.*y2.^2 + 94464000.*y2 + 206280000)./(x2.^4 - 160.*3.^(1/2).*x2.^3 + 28800.*x2.^2 - (5713230008462375.*x2)./4294967296 + 23040000)).^(1/2) + 80.*x2.^2 + 5.*x2.^2.*(((6570214509731731.*x2.^3)./68719476736 - (3900231685776981.*x2.^3.*y2)./4398046511104 - 444.*x2.^4 + 68.*x2.^2.*y2.^2 + 142560.*x2.^2.*y2 - 6811425.*x2.^2 - (5179995207672553.*x2.*y2.^2)./549755813888 - (7498614386106867.*x2.*y2)./1073741824 + (661280917803823.*x2)./4194304 + 326400.*y2.^2 + 94464000.*y2 + 206280000)./(x2.^4 - 160.*3.^(1/2).*x2.^3 + 28800.*x2.^2 - (5713230008462375.*x2)./4294967296 + 23040000)).^(1/2) - 80.*3.^(1/2).*x2.*y2 - 400.*3.^(1/2).*x2.*(((6570214509731731.*x2.^3)./68719476736 - (3900231685776981.*x2.^3.*y2)./4398046511104 - 444.*x2.^4 + 68.*x2.^2.*y2.^2 + 142560.*x2.^2.*y2 - 6811425.*x2.^2 - (5179995207672553.*x2.*y2.^2)./549755813888 - (7498614386106867.*x2.*y2)./1073741824 + (661280917803823.*x2)./4194304 + 326400.*y2.^2 + 94464000.*y2 + 206280000)./(x2.^4 - 160.*3.^(1/2).*x2.^3 + 28800.*x2.^2 - (5713230008462375.*x2)./4294967296 + 23040000)).^(1/2) + 227000)/(2.*x2.^2 - 160.*3.^(1/2).*x2 + 2.*y2.^2 - 160.*y2 + 12800);

代码如上,我想先设置参数t,然后求出来x2,y2的值(从0到2*pi的对应值)

然后再把x2,y2的对应值导入y3的等式里的x2,y2项,

但是得到的答案只有一个虚数4.8593 +30.8495i

首先不说会得到虚数这么神经的答案,为什么答案只出来了一个?

这里y3是用一个方程((5675-y3*(80-2*y2))/(80*3^0.5-2*x2)-40*3^0.5)^2+(y3-40)^2=45^2来求解,但是为什么得到的y3解会含有y3?而不是只有x2,y2,t的解?

syms t x3 y3;

>> x2= (320*cos(t)^2 + 320*sin(t)^2 - (sin(t)*(55*sin(t) - 4*cos(t)*(-(25*(64*cos(t)^2 + 64*sin(t)^2 - 1)*(64*cos(t)^2 + 64*sin(t)^2 - 121))/16)^(1/2) + 320*sin(t)^3 + 320*cos(t)^2*sin(t)))/(cos(t)^2 + sin(t)^2) + 55)/(8*cos(t));

>> y2=(55*sin(t) + 4*cos(t)*(-(25*(64*cos(t)^2 + 64*sin(t)^2 - 1)*(64*cos(t)^2 + 64*sin(t)^2 - 121))/16)^(1/2) + 320*sin(t)^3 + 320*cos(t)^2*sin(t))/(8*(cos(t)^2 + sin(t)^2));

>> [y3]=solve('((5675-y3*(80-2*y2))/(80*3^0.5-2*x2)-40*3^0.5)^2+(y3-40)^2=45^2');

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值