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!