MATLAB Examples

This is an example of how to create a graph plot in MATLAB®.

Read about the gplot function in the MATLAB documentation.

For more examples, go to MATLAB Plot Gallery

% Create the onnectivity graph of the Buckminster Fuller geodesic dome
[B, V] = bucky;
H = sparse(60, 60);
k = 31:60;
H(k, k) = B(k, k);

% Visualize the graph using the gplot function (blue)
gplot(B - H, V, 'b-')
hold on

% Visualize a rotation of the graph (red)
gplot(H, V, 'r-')
axis off equal