How to plot poisson distribution from this code
Show older comments
Hi I need help. How plot the probability distribution from this code
%Random Graph
% N number of nudes
% V = edges
% p possibility
N = input('no. of Nodes');
p = input('Give the possibility');
% Make adjacency matrix
idx = find(triu(ones(N),1));
V = rand(((N-1)*N)/2,1)<p;
A = zeros(N);
A(idx) = V;
A = A + triu(A,1)';
matrix = full(A)
% create and plot undirected graph object
figure
g = graph(A);
h = plot(g,'Layout','circle');
Answers (0)
Categories
Find more on Networks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!