I am creating a graph using graph function but it shows error. why so?

Code: >> g = graph([1 1],[2 3]) Undefined function 'graph' for input arguments of type 'double'.

1 comentario

What MATLAB version are you using? The graph documentation states that it was introduced in MATLAB R2015b.

Iniciar sesión para comentar.

 Respuesta aceptada

Stephan
Stephan el 18 de Jun. de 2018
Editada: Stephan el 18 de Jun. de 2018
Hi,
the code you sent works on my R2017a. There is no error - which Matlab version do you use? This function was introduced in R2015b. If you have an ealier release it will not work.
g = graph([1 1],[2 3])
g =
graph with properties:
Edges: [2×1 table]
Nodes: [3×0 table]
Best regards
Stephan

1 comentario

Edited typing error:
2015b instead of 2016b like Stephen wrote in his comment.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graph and Network Algorithms en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 18 de Jun. de 2018

Comentada:

el 18 de Jun. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by