diff options
Diffstat (limited to 'Metrics/Metrics-Calculation/SocialNetwork_plugin/model/statistics/plot_distribution.m')
-rw-r--r-- | Metrics/Metrics-Calculation/SocialNetwork_plugin/model/statistics/plot_distribution.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Metrics/Metrics-Calculation/SocialNetwork_plugin/model/statistics/plot_distribution.m b/Metrics/Metrics-Calculation/SocialNetwork_plugin/model/statistics/plot_distribution.m new file mode 100644 index 00000000..4c67a191 --- /dev/null +++ b/Metrics/Metrics-Calculation/SocialNetwork_plugin/model/statistics/plot_distribution.m | |||
@@ -0,0 +1,11 @@ | |||
1 | clear; | ||
2 | clc; | ||
3 | |||
4 | matrix = load('-ascii', "output.txt"); | ||
5 | hist(matrix,unique(matrix)); | ||
6 | hold on; | ||
7 | [a,b] = hist(matrix,unique(matrix)) | ||
8 | plot(b, a) | ||
9 | hold off; | ||
10 | sum(matrix) | ||
11 | average = sum(matrix) / length(matrix) \ No newline at end of file | ||