How to plot poisson distribution from this code
1 view (last 30 days)
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');
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!