# MATLAB Program that Scatters Nodes Uniformly Randomly over a Square Region

Question

Write a program (in any language, including matlab) to do the following. Consider a square region of 100 X 100 units. Scatter 100 nodes uniformly randomly over this square region. Do not confine the coordinates to integer values only. For example, the coordinate of a node could be (27.234561, 89.876541). Two nodes are connected (i.e., there is an edge between the two nodes) if their mutual distance is less than d units. Find the adjacency matrix for the network thus created for d=15. i) Find and plot the degree distribution. Do the same (i.e., find and plot the degree distribution) when ii) d = 30, iii) d = 40. Use the same deployment of the 100 nodes (i.e., for the same coordinates you used for d=15). For all the plots, keep the same range for the x-axis and y-axis. Instructions: For this question, just submit the 3 plots.

Summary

This question belongs to MATLAB software and discusses about application of MATLAB in mathematics to write a program that scatter nodes uniformly randomly over a square region and to plot the degree distribution.

• Rasha

this is a very good website

• maani

I have 50 questions for the same test your page is showing only 28

• joeanne

• joeanne

hi can anyone help or guide me to my assignments. thanks

• Monik

• Cristina

This solution is perfect ...thanks

• Janete

Hello Allison,I love the 2nd image that you did! I also, had never heard of SumoPaint, is something that I will have to exolpre a bit! I understand completely the 52 (or so) youtube videos that you probably watched. Sometimes they have what you want, sometimes they don't! However, it is always satisfying when you are able to produce something that you have taught yourself. Great job!Debra 0 likes

• Sandeep

Perfect bank of solution.

• Oxana

great !

• Paul Brandon-Fritzius

thanks for the quick response. the solution looks good. :)

• tina Johnson

thnx for the answer. it was perfect. just the way i wanted it.

• Giuseppe

works fine.