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-04-02 广告
2024-04-02 广告
正弦振动多用于找出产品设计或包装设计的脆弱点。看在哪一个具体频率点响应最大(共振点);正弦振动在任一瞬间只包含一种频率的振动,而随机振动在任一瞬间包含频谱范围内的各种频率的振动。由于随机振动包含频谱内所有的频率,所以样品上的共振点会同时激发...
点击进入详情页
本回答由富港检测技术(东莞)有限公司_提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询