matlab求两条曲线交点,查看程序错误
来源:学生作业帮 编辑:大师作文网作业帮 分类:综合作业 时间:2024/11/10 20:35:02
matlab求两条曲线交点,查看程序错误
曲线拟合得到下面两个方程:
y2=0.0004*x.^3-0.01*x.^2+0.0868*x+0.4762;
y3=0.0044*x.^2-0.1381*x+1.9707;
怎么求交点呢?
[A23,B23]=solve(y2,y3,'x','y')这样吗?
A23=solve('0.0004*x.^3-0.01*x.^2+0.0868*x+0.4762','0.0044*x.^2-0.1381*x+1.9707','x')还是这样?
初学者,
曲线拟合得到下面两个方程:
y2=0.0004*x.^3-0.01*x.^2+0.0868*x+0.4762;
y3=0.0044*x.^2-0.1381*x+1.9707;
怎么求交点呢?
[A23,B23]=solve(y2,y3,'x','y')这样吗?
A23=solve('0.0004*x.^3-0.01*x.^2+0.0868*x+0.4762','0.0044*x.^2-0.1381*x+1.9707','x')还是这样?
初学者,
写成一个equation
>> [x,y]=solve('y=0.0004*x^3-0.01*x^2+0.0868*x+0.4762','y=0.0044*x^2-0.1381*x+1.9707')
x =
-2.0539645392472387328292934509806
5.9167869098709525181076116820272 - 2.5780262226409867152778519536427*i
5.9167869098709525181076116820272 + 2.5780262226409867152778519536427*i
y =
-1.0606951998873693906735695969775
1.3778975999436846953367847984888 + 2.4609183635490359328778613398998*i
1.3778975999436846953367847984888 - 2.4609183635490359328778613398998*i
再问: [x,y]=solve('y=0.0057*x.^2-0.1285*x+1.4165','y=0.0044*x.^2-0.1381*x+1.9707')
这段程序有什么错吗?为什么一直提示有问题呢?
再答: 要求是输入一个equation
x.^2应该输入成x^2
类似的
>> [x,y]=solve('y=0.0004*x^3-0.01*x^2+0.0868*x+0.4762','y=0.0044*x^2-0.1381*x+1.9707')
x =
-2.0539645392472387328292934509806
5.9167869098709525181076116820272 - 2.5780262226409867152778519536427*i
5.9167869098709525181076116820272 + 2.5780262226409867152778519536427*i
y =
-1.0606951998873693906735695969775
1.3778975999436846953367847984888 + 2.4609183635490359328778613398998*i
1.3778975999436846953367847984888 - 2.4609183635490359328778613398998*i
再问: [x,y]=solve('y=0.0057*x.^2-0.1285*x+1.4165','y=0.0044*x.^2-0.1381*x+1.9707')
这段程序有什么错吗?为什么一直提示有问题呢?
再答: 要求是输入一个equation
x.^2应该输入成x^2
类似的