how to do the matrix computation
이전 댓글 표시
I have a cost matrix, c, with values as
c =[0,12,11,7,10,10,9,8,6,12;
12,0,8,5,9,12,14,16,17,22;
11,8,0,9,15,17,8,18,14,22;
7,5,9,0,7,9,11,12,12,17;
10,9,15,7,0,3,17,7,15,18;
10,12,17,9,3,0,18,6,15,15;
9,14,8,11,17,18,0,16,8,16;
8,16,18,12,7,6,16,0,11,11;
6,17,14,12,15,15,8,11,0,10;
12,22,22,17,15,15,16,11,10,0]
i wanted to do a computation
sij = c0i + c0j - cij
sij = sji;
and get store into a new matrix s as shown below

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!