MATLAB求解方程组
x^2+y^2=1xy=2%ex_20.mfunctionz=ex_20(p)z(1)=p(1)^2+p(2)^2;z(2)=p(1)*p(2);保存,然后输入fsolv...
x^2+y^2=1
xy=2
%ex_20.m
function z=ex_20(p)
z(1)=p(1)^2+p(2)^2;
z(2)=p(1)*p(2);
保存,然后输入
fsolve x=('ex_20',[0 0])
这样对吗?
错了,保存后输入
x=fsolve('ex_20',[0 0]) 展开
xy=2
%ex_20.m
function z=ex_20(p)
z(1)=p(1)^2+p(2)^2;
z(2)=p(1)*p(2);
保存,然后输入
fsolve x=('ex_20',[0 0])
这样对吗?
错了,保存后输入
x=fsolve('ex_20',[0 0]) 展开
1个回答
展开全部
>> [x,y]=solve('x^2+y^2=1','x*y=2','x','y')
x =
((15^(1/2)*i)/2 + 1/2)^(1/2)/2 - ((15^(1/2)*i)/2 + 1/2)^(3/2)/2
((15^(1/2)*i)/2 + 1/2)^(3/2)/2 - ((15^(1/2)*i)/2 + 1/2)^(1/2)/2
(1/2 - (15^(1/2)*i)/2)^(1/2)/2 - (1/2 - (15^(1/2)*i)/2)^(3/2)/2
(1/2 - (15^(1/2)*i)/2)^(3/2)/2 - (1/2 - (15^(1/2)*i)/2)^(1/2)/2
y =
((15^(1/2)*i)/2 + 1/2)^(1/2)
-(1/2*15^(1/2)*i + 1/2)^(1/2)
(1/2 - (15^(1/2)*i)/2)^(1/2)
-(1/2 - 1/2*15^(1/2)*i)^(1/2)
>> x=vpa(x)
x =
1.1180339887498948482045868343656 - 0.86602540378443864676372317075294*i
0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
0.86602540378443864676372317075294*i + 1.1180339887498948482045868343656
- 0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
>> y=vpa(y)
y =
0.86602540378443864676372317075294*i + 1.1180339887498948482045868343656
- 0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
1.1180339887498948482045868343656 - 0.86602540378443864676372317075294*i
0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
>> ex_20([1 1])
ans =
2 1
x =
((15^(1/2)*i)/2 + 1/2)^(1/2)/2 - ((15^(1/2)*i)/2 + 1/2)^(3/2)/2
((15^(1/2)*i)/2 + 1/2)^(3/2)/2 - ((15^(1/2)*i)/2 + 1/2)^(1/2)/2
(1/2 - (15^(1/2)*i)/2)^(1/2)/2 - (1/2 - (15^(1/2)*i)/2)^(3/2)/2
(1/2 - (15^(1/2)*i)/2)^(3/2)/2 - (1/2 - (15^(1/2)*i)/2)^(1/2)/2
y =
((15^(1/2)*i)/2 + 1/2)^(1/2)
-(1/2*15^(1/2)*i + 1/2)^(1/2)
(1/2 - (15^(1/2)*i)/2)^(1/2)
-(1/2 - 1/2*15^(1/2)*i)^(1/2)
>> x=vpa(x)
x =
1.1180339887498948482045868343656 - 0.86602540378443864676372317075294*i
0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
0.86602540378443864676372317075294*i + 1.1180339887498948482045868343656
- 0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
>> y=vpa(y)
y =
0.86602540378443864676372317075294*i + 1.1180339887498948482045868343656
- 0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
1.1180339887498948482045868343656 - 0.86602540378443864676372317075294*i
0.86602540378443864676372317075294*i - 1.1180339887498948482045868343656
>> ex_20([1 1])
ans =
2 1
东莞大凡
2024-11-14 广告
2024-11-14 广告
标定板认准大凡光学科技,专业生产研发厂家,专业从事光学影像测量仪,光学投影测量仪.光学三维测量仪,光学二维测量仪,光学二维测量仪,光学三维测量仪,光学二维测量仪.的研发生产销售。东莞市大凡光学科技有限公司创立于 2018 年,公司总部坐落于...
点击进入详情页
本回答由东莞大凡提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询