Code:
clc;
clear all;
close all;
A= randi(100,1,30) % dataset for 30 numbers
Mean=mean(A) % mean of data
Median = median(A) % median of data
Stanard_Deviation = std(A) % Stanard_Deviation
Variance = var(A) % Variance
CV=Stanard_Deviation/Mean % Coefficient of variation
Output:
A=
Columns 1 through 13
5 58 100 37 56 93 26 84 18 88 28 85 81
Columns 14 through 26
19 98 26 78 82 50 92 11 14 86 2 73 82
Columns 27 through 30
12 49 35 78
Mean =
54.866666666666667
Median =
57
Stanard_Deviation =
32.504358682080365
Variance =
1.056533333333333e+03
CV =
0.592424520329533