Borrar filtros
Borrar filtros

I'm facing problem with graph and digraphs in matlab

1 visualización (últimos 30 días)
Hello everyone, My question is how can we plot graphs using nodes and edges(streets in my case), while I am doing the same it keeps on showing the followingerror....can anyone show me how can I rectify the same....
  6 comentarios
Stephan
Stephan el 28 de Feb. de 2019
Ok,
can you provide the results of this code which are in your workspace? Please save them as .mat-file and attach them. I do not have access to Mapping Toolbox and if i had it would be needed to see the .shp-files. But more important is what you have as variables in workspace.
Rama Sidhardha Yeleti
Rama Sidhardha Yeleti el 1 de Mzo. de 2019
Sir, below attached is the varaibles in workspace that are generated while running that code please check once.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 1 de Mzo. de 2019
kk = [r.coor_x_sam; r.coor_y_sam].';
sd = [ss.START_X; ss.END_X] .';
However, these are two different sizes: 2021 entries compared to 1044 entries. Neither one of them contains integers, so neither of them contains vertices indexes. Neither one of them is an adjacency matrix or mass matrix. The units appear to be incompatible: it looks to me as if coor_x_sam is degrees whereas START_X appears to be UMC, and coor_x appears to be UMC. You also are not taking into account any Y coordinates.
I think what you have is map data, not graph data.
Now, it happens to be possible to match coor_x and coor_y against START_X and START_Y, indicating that it would be possible to convert into node numbers to construct a graph; it would then be possible to associate X Y coordinates with each node when you plotted, but that can be a bit of a nuisance.
  20 comentarios
Rama Sidhardha Yeleti
Rama Sidhardha Yeleti el 12 de Mzo. de 2019
Sir, while applying the all-pairs-shortest-path-graph-solver it is not running and it is out with various errors can you give a try on that ?
Walter Roberson
Walter Roberson el 12 de Mzo. de 2019
What error message are you observing?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Directed Graphs en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by