Hi Vasilis,
I understand that you are looking for an implementation of Dijkstra's algorithm for weighted graphs.
I recommend the following resource from MATLAB's FileExchange that addresses your query: shortest_distance_Dijkstra_algorithm.m - https://www.mathworks.com/matlabcentral/fileexchange/46458-shortest_distance_dijkstra_algorithm-m
Hope this helps!