I am creating a graph using graph function but it shows error. why so?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Code: >> g = graph([1 1],[2 3]) Undefined function 'graph' for input arguments of type 'double'.
1 commentaire
Stephen23
le 18 Juin 2018
What MATLAB version are you using? The graph documentation states that it was introduced in MATLAB R2015b.
Réponse acceptée
Stephan
le 18 Juin 2018
Modifié(e) : Stephan
le 18 Juin 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 commentaire
Stephan
le 18 Juin 2018
Edited typing error:
2015b instead of 2016b like Stephen wrote in his comment.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Graph and Network Algorithms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!