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

9 Ansichten (letzte 30 Tage)
Code: >> g = graph([1 1],[2 3]) Undefined function 'graph' for input arguments of type 'double'.
  1 Kommentar
Stephen23
Stephen23 am 18 Jun. 2018
What MATLAB version are you using? The graph documentation states that it was introduced in MATLAB R2015b.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Stephan
Stephan am 18 Jun. 2018
Bearbeitet: Stephan am 18 Jun. 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

Weitere Antworten (0)

Kategorien

Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by