MATLAB怎样解系数是向量的二元一次方程?。

3 次查看(过去 30 天)
jqfyccer
jqfyccer 2023-5-21
回答: xudcqsk 2023-5-21
比如有这个方程组
2x+3y=5;
ax+y=3;
这里a=0:10,
这个应该怎样解出a等于各个值时候对应的x和y呢

采纳的回答

xudcqsk
xudcqsk 2023-5-21
仅供参考
syms A1 E1 A2 E2  %测站1、2测得的A角和E角
x1=400;y1=0;z1=1000;
x2=600;y2=0;z2=-1000;
yt=600;zt=500;%当xt是向量时,
i=0;
for  xt=0:3   
    i=i+1;
    eq1=x1-xt+((x1-x2).*tan(A2)-(z1-z2))./...
    (tan(A1)-tan(A2));
    eq3=z1-zt+((x1-x2).*tan(A2)-(z1-z2)).*tan((A1))./...
    (tan((A1))-tan((A2)));
    [A1s,A2s]=solve([eq1,eq3],[A1,A2]);
    A1ss(i)=double(A1s);
    A2ss(i)=double(A2s);
end
A1ss

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 数学 的更多信息

Community Treasure Hunt

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

Start Hunting!