-
Notifications
You must be signed in to change notification settings - Fork 0
/
trendplot.m
76 lines (67 loc) · 2.24 KB
/
trendplot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
%% simple elaboration of 'Microprocessor Trend Data' from Karl Rupp
%%%get data and convert to matrix
url="https://github.com/karlrupp/microprocessor-trend-data/raw/refs/heads/master/50yrs/frequency.dat"; f=urlread(url);
f= strrep(f,'####',''); f=str2num(f); %% removed "####" to use str2num
url="https://github.com/karlrupp/microprocessor-trend-data/raw/refs/heads/master/50yrs/cores.dat"; c=urlread(url);
c= strrep(c,'####',''); c=str2num(c); %% removed "####" to use str2num
url="https://github.com/karlrupp/microprocessor-trend-data/raw/refs/heads/master/50yrs/watts.dat"; w=urlread(url);
w= strrep(w,'####',''); w=str2num(w); %% removed "####" to use str2num
url="https://github.com/karlrupp/microprocessor-trend-data/raw/refs/heads/master/50yrs/transistors.dat"; t=urlread(url);
t= strrep(t,'####',''); t=str2num(t); %% removed "####" to use str2num
%%%%plot
figure(1)
subplot(2,2,1)
F=f(:,1)>1990;
x=(f(:,1)); x=x(F); y=(f(:,2)); y=y(F);
scatter(x,y/1000,35,"k","square")
hold on
[p,~,mu] = polyfit(x,y,8);
x1=min(x):(max(x)-min(x))/200:max(x);
y1 = polyval(p,x1,[],mu);
plot(x1,y1/1000,'r','linewidth',2);
set(gca,'fontsize',12)
grid on
title('Frequency [GHz]')
axis([1990 2021 0 inf])
%set(gca, 'YScale', 'log10')
subplot(2,2,2)
F=w(:,1)>1990;
x=w(:,1);x=x(F); y=w(:,2); y=y(F);
scatter(x,y,35,"k","square")
hold on
[p,~,mu] = polyfit(x,y,3);
x1=min(x):(max(x)-min(x))/20000:max(x);
y1 = polyval(p,x1,[],mu);
plot(x1,y1,'r','linewidth',2)
set(gca,'fontsize',12)
grid on
title('Dissipated power [W]')
axis([1990 2022 0 inf])
subplot(2,2,3)
F=c(:,1)>1990;
x=c(:,1);x=x(F); y=c(:,2); y=y(F);
scatter(x,y,35,"k","square")
hold on
F=c(:,1)>2006;
x=c(:,1);x=x(F); y=c(:,2); y=y(F);
[p,~,mu]= polyfit(x,y,3);
x1=min(x):(max(x)-min(x))/2000:max(x);
y1 = polyval(p,x1,[],mu);
plot(x1,y1,'r','linewidth',2)
set(gca,'fontsize',12)
grid on
title('#Cores')
axis([1990 2022 0 inf])
subplot(2,2,4)
F=t(:,1)>1990;
x=t(:,1);x=x(F); y=log10(t(:,2)*1000); y=y(F);
scatter(x,y,35,"k","square")
hold on
[p,~,mu] = polyfit(x,y,3);
x1=min(x):(max(x)-min(x))/20000:max(x);
y1 = polyval(p,x1,[],mu);
plot(x1,y1,'r','linewidth',2);
set(gca,'fontsize',12)
grid on
title('log10 #Transistor')
axis([1990 2022 min(y) max(y)])