数学matlab写代码,1式:3*x1+3.5*x2+4*x3+4.5*x4+5*x5+5.5*x6+6*x7+6.5*x8=89x1+ x2+x3+x4+x5+x6+x7+x8=200≤x1≤43 0≤x2≤59 0≤x3≤39 0≤x4≤41 0≤x5≤27 0≤x6≤28 0≤x7≤34 0≤x8≤21Yn= (x1,x2,x3,x4,x5,x6,x7,x8)求各种满足
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/30 07:26:14
![数学matlab写代码,1式:3*x1+3.5*x2+4*x3+4.5*x4+5*x5+5.5*x6+6*x7+6.5*x8=89x1+ x2+x3+x4+x5+x6+x7+x8=200≤x1≤43 0≤x2≤59 0≤x3≤39 0≤x4≤41 0≤x5≤27 0≤x6≤28 0≤x7≤34 0≤x8≤21Yn= (x1,x2,x3,x4,x5,x6,x7,x8)求各种满足](/uploads/image/z/6835158-54-8.jpg?t=%E6%95%B0%E5%AD%A6matlab%E5%86%99%E4%BB%A3%E7%A0%81%2C1%E5%BC%8F%EF%BC%9A3%2Ax1%2B3.5%2Ax2%2B4%2Ax3%2B4.5%2Ax4%2B5%2Ax5%2B5.5%2Ax6%2B6%2Ax7%2B6.5%2Ax8%3D89x1%2B+x2%2Bx3%2Bx4%2Bx5%2Bx6%2Bx7%2Bx8%3D200%E2%89%A4x1%E2%89%A443+0%E2%89%A4x2%E2%89%A459+0%E2%89%A4x3%E2%89%A439+0%E2%89%A4x4%E2%89%A441+0%E2%89%A4x5%E2%89%A427+0%E2%89%A4x6%E2%89%A428+0%E2%89%A4x7%E2%89%A434+0%E2%89%A4x8%E2%89%A421Yn%3D+%EF%BC%88x1%2Cx2%2Cx3%2Cx4%2Cx5%2Cx6%2Cx7%2Cx8%EF%BC%89%E6%B1%82%E5%90%84%E7%A7%8D%E6%BB%A1%E8%B6%B3)
数学matlab写代码,1式:3*x1+3.5*x2+4*x3+4.5*x4+5*x5+5.5*x6+6*x7+6.5*x8=89x1+ x2+x3+x4+x5+x6+x7+x8=200≤x1≤43 0≤x2≤59 0≤x3≤39 0≤x4≤41 0≤x5≤27 0≤x6≤28 0≤x7≤34 0≤x8≤21Yn= (x1,x2,x3,x4,x5,x6,x7,x8)求各种满足
数学matlab写代码,
1式:3*x1+3.5*x2+4*x3+4.5*x4+5*x5+5.5*x6+6*x7+6.5*x8=89
x1+ x2+x3+x4+x5+x6+x7+x8=20
0≤x1≤43 0≤x2≤59 0≤x3≤39 0≤x4≤41 0≤x5≤27 0≤x6≤28 0≤x7≤34 0≤x8≤21
Yn= (x1,x2,x3,x4,x5,x6,x7,x8)
求各种满足一式的x1~x8的所有会出现的解,用Yn表达.
如何用matlab写得出多个Yn的X1~8
X1~X8取整数
数学matlab写代码,1式:3*x1+3.5*x2+4*x3+4.5*x4+5*x5+5.5*x6+6*x7+6.5*x8=89x1+ x2+x3+x4+x5+x6+x7+x8=200≤x1≤43 0≤x2≤59 0≤x3≤39 0≤x4≤41 0≤x5≤27 0≤x6≤28 0≤x7≤34 0≤x8≤21Yn= (x1,x2,x3,x4,x5,x6,x7,x8)求各种满足
i=1;
for x1=0:4
for x2=0:5
for x3=0:3
for x4=0:4
for x5=0:2
for x6=0:2
for x7=0:3
for x8=0:2
if 3*x1+3.5*x2+4*x3+4.5*x4+5*x5+5.5*x6+6*x7+6.5*x8==89.0...
...&&x1+x2+x3+x4+x5+x6+x7+x8==20
Y(i,:)=[x1,x2,x3,x4,x5,x6,x7,x8];
i=i+1;
end
end
end
end
end
end
end
end
end
%结果太多了,我把x1~x8的范围缩小了,有74组解.
%你可以用线性代数的方法,解出1式的基础解系.