马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
我有一个程序运行老出错,请高人指点.
我把程序简化一下,是这样的:
rou1=7850
d=10^(-3).*[9,9,17,17,17,17,17,17,17,17]
l=10^(-3).*[4,4,10.75,10.75,10.75,10.75,11,11,7.75,7.75]
u=rou1.*pi.*d.^2./4;
jp=0.5.*u.*d.^2./4;
jd=u./12.*(3.*d.^2./4+l.^2);
显示的结果是:
jp =
1.0e-004 *
0.0506 0.0506 0.6437 0.6437 0.6437 0.6437 0.6437 0.6437 0.6437 0.6437
jd =
1.0e-004 *
0.0319 0.0319 0.4934 0.4934 0.4934 0.4934 0.5015 0.5015 0.4110 0.4110
一切显示正常.
但是我实际计算中d和l是80列的向量.结果就出错.我真的不知道错在那里
d=10^(-3).*[9,9,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,22,22,22,22,22,22,24,24,24,24,44,44,39.7,39.7,26,26,26,22,22,22,22,21,21,21,21,19,19,19,19,19,19,19,19,19,19,18,18,18,18,18,18,18,18,18,18,17,17,17,17,17,17,17,17,17,17,9,9,9];
l=10^(-3).*[4,4,10.75,10.75,10.75,10.75,11,11,7.75,7.75,7.75,7.75,9.75,9.75,9.75,9.75,11,11,10,10,10,10,9.83,9.83,9.83,9.83,9.83,9.83,13,13,4.5,4.5,12,12,13,13,16.33,16.33,16.33,17.25,17.25,17.25,17.25,16,16,16,16,10,10,10,10,11,11,7.25,7.25,7.25,7.25,10.25,10.25,10.25,10.25,11,11,9.75,9.75,9.75,9.75,7.75,7.75,7.75,7.75,11,11,10.75,10.75,10.75,10.75,4,4,4];
rou1=7850
d=10^(-3).*[9,9,17,17,17,17,17,17,17,17]
l=10^(-3).*[4,4,10.75,10.75,10.75,10.75,11,11,7.75,7.75]
u=rou1.*pi.*d.^2./4;
jp=0.5.*u.*d.^2./4;
jd=u./12.*(3.*d.^2./4+l.^2);
显示的结果是:
jp =
Columns 1 through 16
0.0000 0.0000 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001
Columns 17 through 32
0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0002 0.0002 0.0002 0.0002 0.0002 0.0002 0.0003 0.0003 0.0003 0.0003
Columns 33 through 48
0.0029 0.0029 0.0019 0.0019 0.0004 0.0004 0.0004 0.0002 0.0002 0.0002 0.0002 0.0001 0.0001 0.0001 0.0001 0.0001
Columns 49 through 64
0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001
Columns 65 through 80
0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0001 0.0000 0.0000 0.0000
为何jp的很多列为0,请指教. |