0001 [A, map] = imread('H_final_24.bmp', 'BMP'); 0002 [roadPoints, costMap] = findRoads(A); 0003 crossingPoints =[ 0004 187 54 0005 185 79 0006 183 52 0007 158 18 0008 147 21 0009 142 22 0010 144 39 0011 156 77 0012 158 18 0013 154 139 0014 167 71 0015 147 30 0016 178 70 0017 150 109 0018 148 109 0019 62 195 0020 232 34 0021 223 41 0022 205 69 0023 246 44 0024 200 79 0025 196 84 0026 159 149 0027 157 157 0028 154 159 0029 143 141 0030 140 151 0031 140 151 0032 140 142 0033 122 113 0034 106 105 0035 103 106 0036 96 109 0037 34 140 0038 32 140 0039 1 145 0040 48 97 0041 62 99 0042 79 74 0043 97 132 0044 35 156 0045 64 175 0046 259 96 0047 256 96 0048 54 238 0049 71 118 0050 82 111 0051 147 119 0052 39 239 0053 ]; 0054 [node1Node2Road_noCost, positionRoad_no, markedRoad, nodes] = identifyRoads(roadPoints, crossingPoints); 0055 fi = []; 0056 vi = [62 138]; 0057 oldCost = 0; 0058 fiVec = [219 46 0059 209 65 0060 187 92 0061 178 131 0062 167 146]; 0063 for i = 1:length(fiVec(:,1)) 0064 fi = fiVec(i,:); 0065 [costChange, proccentualChange,oldCost] = getCostChange(oldCost, roadPoints, positionRoad_no, fi, vi, nodes, node1Node2Road_noCost, costMap); 0066 proccentualChange 0067 end