sets :jj/1..9/;j/1..10/;k(jj,j):M;endsetsdata:M= 0.8241 1.0000 0.2551 0.7481 0.6433 0.3656 0.6558 0.4925 0.92190.2211 0.4138 0.5301 0.4594 0.6070 0.5220 0.7197 0.4154 0.31440.4488 0.3786 0.7366 0.5662 0.3036 0.3558 0.5002 0.4235 0.29780.9291 0.4012 0

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/06 11:40:37
sets:jj/1..9/;j/1..10/;k(jj,j):M;endsetsdata:M=0.82411.00000.25510.74810.64330.36560.65580.49250.921

sets :jj/1..9/;j/1..10/;k(jj,j):M;endsetsdata:M= 0.8241 1.0000 0.2551 0.7481 0.6433 0.3656 0.6558 0.4925 0.92190.2211 0.4138 0.5301 0.4594 0.6070 0.5220 0.7197 0.4154 0.31440.4488 0.3786 0.7366 0.5662 0.3036 0.3558 0.5002 0.4235 0.29780.9291 0.4012 0
sets :
jj/1..9/;
j/1..10/;
k(jj,j):M;
endsets
data:
M= 0.8241 1.0000 0.2551 0.7481 0.6433 0.3656 0.6558 0.4925 0.9219
0.2211 0.4138 0.5301 0.4594 0.6070 0.5220 0.7197 0.4154 0.3144
0.4488 0.3786 0.7366 0.5662 0.3036 0.3558 0.5002 0.4235 0.2978
0.9291 0.4012 0.9436 0.5363 0.6359 0.2631 0.9961 0.3108 0.2271
0.2202 0.3001 0.5179 0.4720 0.7309 0.3771 0.6213 0.2307 0.3306
0.5384 0.3218 0.6739 0.5159 0.2407 0.3545 0.7337 0.2778 0.3845
0.8273 0.7394 0.3981 0.3845 0.5750 0.4186 0.5060 0.9509 0.9770
0.6285 1.0000 0.5618 0.3545 0.8835 0.9658 0.3950 0.3981 0.9961
0.9923 0.7597 0.4106 0.9327 0.5772 0.3830 0.3358 0.3490 0.8938
0.5041 0.5139 0.5908 0.8052 0.3586 0.3450 0.3306 0.4868 0.4318;
enddata
max=@sum(k:M*M);
为什么这个是算M与M的点乘,最后把所有的的结合相加,如果要在里面加上什么i,j什么的,该怎样加呀,
一楼的不 我早试过了

sets :jj/1..9/;j/1..10/;k(jj,j):M;endsetsdata:M= 0.8241 1.0000 0.2551 0.7481 0.6433 0.3656 0.6558 0.4925 0.92190.2211 0.4138 0.5301 0.4594 0.6070 0.5220 0.7197 0.4154 0.31440.4488 0.3786 0.7366 0.5662 0.3036 0.3558 0.5002 0.4235 0.29780.9291 0.4012 0
楼主到底是想算什么啊?没明白…百度Hi我吧…

你的M*M的意思就是相同行标和列标的数相乘后再sum求和。相当于
max=@sum(k(a,b):M(a,b)*M(a,b));
(没用i,j应为在变量里定义了j)