# Semiautomated Statistical Discontinuity Analyses from Scanline Data of Fractured Rock Masses
## 4 Application Example
### Spacing and Frequency  
According to the three sets defined by the cluster analysis, the normal set distribution and the mean of each set were determined by executing Steps II, III, and IV (Figure 2).  
During Step II, calculation of the acute angle between the mean set orientation of each discontinuity set and each scanline orientation is performed, resulting in a table of cos (\(\delta\)) values. For our case study, three discontinuity sets (i.e., set 1, 2 and 3) were defined from the data set based on eight scanlines, labeled 1, 3, 4, 6, 9, 10, 13, and 15 (see scanline_set_orientation.dat). By executing the m-file _cos_delta_calculation.m_, cos (\(\delta\)) values are calculated for each set and stored as workspace variables _data_cos_set_1, data_cos_set_2 and _data_cos_set_3_ in the mat-file _data_cos_set_1-3.mat_.  
In Step III, scanline intersection distances measured for a certain discontinuity set are filtered from the total data set of the entity of all scanlines (i.e., dat-file _spacing_data.dat_). Concerning the three sets of the test site, the filter criteria are loaded from the files, referred to as _set1_data.dat_, _set2_data.dat_, and _set3_data.dat_. Executing the m-file _spacing_filtering.m_ saves the results in the mat-file _spacing_set1-3.mat_, including the variables for each set, labeled _spacing_set1_, _spacing_set2_ and _spacing_set3_.  
Step IV is carried out for each discontinuity set, i.e., sets 1, 2 and 3, separately and calculates the normal set spacing values. Before executing the m-file _spacing_calculation_set.m_ for each set some modifications of the m-script have to be done. This means that the discontinuity set for which the calculation should be performed has to be selected by choosing the right variable, e.g., _spacing_set1_. Furthermore, the cos (\(\delta\)) values obtained from Step II for the respective set must be entered in the m-file. In the case of the test site herein, for each discontinuity set, eight cos (\(\delta\)) values should be implemented as a line vector in the same order as the scanline numbers above.  
By executing the m-file _spacing_calculation_set.m_, the file _spacing_set1-3.mat_, which was determined in Step III is loaded and the variable _spacing_set1_ for set 1 is selected. As a result, the spacing values are calculated for each set. The script determines several parameters that are stored in the following variables, comprising (i) a table of set spacing (_set_spacing_table_) and normal set spacing (_normal_set_spacing_table_) values, (ii) a table of mean set spacing and mean normal set spacing values for each scanline, and (iii) a table of the mean set and normal set frequency for each scanline. Finally, all results are stored in the mat-file _set1_spacing_parameters.mat_. This procedure must be repeated for sets 2 and 3.  
In Step VI, the results of the spacing analyses are visualized as a histogram showing the normal set spacing versus frequency. The m-file _spacing_histogram.m_ includes all calculations proposed by [PERSON] [14] to plot a histogram with a negative exponential probability density distribution related to the unit width of the class interval. Figure 5 shows the results of the normal set spacing analyses for sets 1, 2, and 3 based on the data of the case study.  
Figure 5: Frequency histogram versus normal set spacing with fitted negative exponential probability density distribution (blue line): (**a**) mean spacing and standard deviation of set 1 \(\overline{X}=0.236\) m, \(SD=0.369\), (**b**) set 2 \(\overline{X}=0.268\) m, \(SD=0.448\), and (**c**) set 3 \(\overline{X}=0.507\) m, \(SD=0.768\). Each of these three plots was created by the m-file _spacing_histogram.m_.