matlab sparse提示倒数第二行有问题,怎么改?
clc,cleara(1,2)=32;a(1,3)=37;a(1,4)=21;a(1,5)=3;a(1,6)=24;a(2,9)=32;a(2,12)=32;a(3,7)...
clc, clear
a(1,2)=32;a(1,3)=37;a(1,4)=21;a(1,5)=3;a(1,6)=24;
a(2,9)=32;a(2,12)=32;
a(3,7)=37;
a(4,8)=21;a(4,10)=21;
a(5,11)=3;
a(6,9)=24;
a(7,13)=42;
a(8,13)=42;
a(9,14)=42;
a(10,14)=42;
a(11,15)=40;
a(12,15)=40;
a(13,16)=42;
a(14,16)=42;
a(15,16)=42;
[i,j,v]=find(a);
tu=sparse(i,j,v,9,9);
[x,y,z]=graphmaxflow(tu,1,16); 展开
a(1,2)=32;a(1,3)=37;a(1,4)=21;a(1,5)=3;a(1,6)=24;
a(2,9)=32;a(2,12)=32;
a(3,7)=37;
a(4,8)=21;a(4,10)=21;
a(5,11)=3;
a(6,9)=24;
a(7,13)=42;
a(8,13)=42;
a(9,14)=42;
a(10,14)=42;
a(11,15)=40;
a(12,15)=40;
a(13,16)=42;
a(14,16)=42;
a(15,16)=42;
[i,j,v]=find(a);
tu=sparse(i,j,v,9,9);
[x,y,z]=graphmaxflow(tu,1,16); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询