Can we use elseif in a conditional statement this much time?%shortest path selection algorithm for R1
Ältere Kommentare anzeigen
%shortest path selection algorithm for R1
if YR11>YR12
small_dist_R11=YR12
elseif YR12>YR11
small_dist_R11=YR11
elseif small_dist_R11>YR13
small_dist_R12=YR13
elseif YR13>small_dist_R11
small_dist_R12=small_dist_R11
elseif small_dist_R12>YR14
small_dist_R13=YR14
elseif YR14>small_dist_R12
small_dist_R13=small_dist_R12
elseif small_dist_R13>YR15
small_dist_R14=YR15
else
small_dist_R14=small_dist_R13
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!