Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Graph::printEdgeWeightInformation

Prints the edge weights of a graph

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

Graph::printEdgeWeightInformation(G)

Description

Graph::printEdgeWeightInformation prints the edge weights of a graph.

Graph::printEdgeWeightInformation(G) prints the edge weights of the graph G

Examples

Example 1

A circle graph is created and the edge weights of it printed to screen:

G := Graph::createCircleGraph(3):
Graph::printEdgeWeightInformation(G)
No edge weights defined.
G := Graph::setEdgeWeights(G, [[1, 2], [2, 3], [3, 1]], [10, 20, 30]):
Graph::printEdgeWeightInformation(G)
Edge weights existing in the graph:
----------------------------------------
Edge [1, 2] has weight 10
Edge [2, 3] has weight 20
Edge [3, 1] has weight 30

Parameters

G

Graph

Return Values

Text containing information about the edge weights of a graph.

Was this topic helpful?