image thumbnail

Erdos-Renyi Random Graph

version (2.86 KB) by Pablo Blinder
Random graph generation.


Updated 25 Jan 2005

No License

The Erdos-Renyi (Erdos and Renyi, 1959) is the first ever proposed algorithm for the formation of random graphs. It selects with equal probability pairs of nodes from the graph set of nodes and connects them with a predefined probability.

To rewire, with probability (p=0.01) a 100 vertex regular graph (vertex deg=4):

To see display the graph issue:

6 is the marker size. 1 tells function to add labels (0 disables labbeling)

Cite As

Pablo Blinder (2022). Erdos-Renyi Random Graph (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!