Mid Exam_20227608. Abraha

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

#1.

G=randi([0 608],51,12);
%Matrix=save('matrix','G','txt')
Month=(1:12);
Years=[1970:2020];
Average=(Month/51);
plot(Average,'r--');
xlabel('Months')
ylabel('Average Values')

#2

G=randi([0 608],51,12);
%Matrix=save('matrix','G','txt')
Month=(1:12);
Years=(1970:2020);

Sum=sum(G,'All');
bar(G);
xlabel('Years')
ylabel('Months')
#3

G=randi([0 608],51,12);
Month=(1:12)
Monthly_median=median(G,1,'omitnan');
SD=std(G);
E=errorbar(Monthly_median,SD)
xlabel('Months')
ylabel('SD')
#4.

G=randi([0 608],51,12);
%Matrix=save('matrix','G','txt')
%Month=(1:12);
bins=12;
%Years=[1970:2020];
%Average=(Month/51);
histogram(G);
xlabel('Months')
ylabel('Values')
title("Distribution of the data")
#5.

G=randi([0 608],51,12);
%Matrix=save('matrix','G','txt')
Month=(1:12);
Years=[1970:2020];
edges[0 20 50 200]
discritize(G,edges,'categorical')
%Average=(Month/51);
figure;
scatter(Month,Years,10,"yellow",'filled');
xlabel('Months')
ylabel('Average Values')

You might also like