Can we use elseif in a conditional statement this much time?%shortest path selection algorithm for R1
Mostrar comentarios más antiguos
%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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!