After I run Matlab program, I get matrices which have only one entry in each row and column.
Mat(:,:,1) = [0 0.3; 0.9 0] - stage 1
Mat(:,:,2) = [0.7 0; 0 0.4] - stage 2
Mat(:,:,3) = [0 0.1; 0.5 0] - stage 3
If I have entry at (i,j)-th position means that this (current) stage i-th node connects with next (future) stage j-th node, and value of entry means its path weight.
As above example:
Mat(:,:,1)
says 1st node of stage 1 connects with the 2nd node of stage 2 and 2nd node of stage 1 connects with the 1st node of stage 2.
Mat(:,:,2)
says 1st node of stage 2 connects with the 1st node of stage 3 and 2nd node of stage 2 connects with the 2nd node of stage 3.
Mat(:,:,3)
says 1st node of stage 3 connects with the 2nd node of stage 4 and 2nd node of stage 3 connects with the 1st node of stage 4.
Then, stage-1 to stage-4 connection paths can be given as with weight:
path1=[0.3, 0.4, 0.5]
path2=[0.9, 0.7, 0.1]
But I do not know how I can get these two path1 and path2 vectors by using Matlab code. This is the simplest example I run for 2 x 2 matrix, but my actual case is general n x n matrix having #n paths.
Can someone please help me to get these paths using matlab when all Mat(:,:,n) matrices are given?