data1 = data(Bin6_BeginRow:Bin6_EndRow, :);
data2 = zeros(max(data1(:, 1)), max(data1(:, 5)));
for i = 1:length(data1)
xx = data1(i, 1);
yy = data1(i, 5);
zz = data1(i, 4);
if zz > data2(xx, yy)
data2(xx, yy) = zz;
end
end
bar3(data2)
b = bar3(data2);
set(b,'FaceColor',[1 0 1]);
hold on
clear data1 data2 i xx yy zz
data1 = data(Bin5_BeginRow:Bin5_EndRow, :);
data2 = zeros(max(data1(:, 1)), max(data1(:, 5)));
for i = 1:length(data1)
xx = data1(i, 1);
yy = data1(i, 5);
zz = data1(i, 4);
if zz > data2(xx, yy)
data2(xx, yy) = zz;
end
end
b = bar3(data2);
set(b,'FaceColor',[0 0 1]);
clear data1 data2 i xx yy zz
data1 = data(Bin4_BeginRow:Bin4_EndRow, :);
data2 = zeros(max(data1(:, 1)), max(data1(:, 5)));
for i = 1:length(data1)
xx = data1(i, 1);
yy = data1(i, 5);
zz = data1(i, 4);
if zz > data2(xx, yy)
data2(xx, yy) = zz;
end
end
b = bar3(data2);
set(b,'FaceColor',[0 1 0]);
clear data1 data2 i xx yy zz
data1 = data(Bin3_BeginRow:Bin3_EndRow, :);
data2 = zeros(max(data1(:, 1)), max(data1(:, 5)));
for i = 1:length(data1)
xx = data1(i, 1);
yy = data1(i, 5);
zz = data1(i, 4);
if zz > data2(xx, yy)
data2(xx, yy) = zz;
end
end
b = bar3(data2);
set(b,'FaceColor',[1 1 0]);
clear data1 data2 i xx yy zz
data1 = data(Bin2_BeginRow:Bin2_EndRow, :);
data2 = zeros(max(data1(:, 1)), max(data1(:, 5)));
for i = 1:length(data1)
xx = data1(i, 1);
yy = data1(i, 5);
zz = data1(i, 4);
if zz > data2(xx, yy)
data2(xx, yy) = zz;
end
end
b = bar3(data2);
set(b,'FaceColor',[0 1 1]);
clear data1 data2 i xx yy zz
data1 = data(Bin1_BeginRow:Bin1_EndRow, :);
data2 = zeros(max(data1(:, 1)), max(data1(:, 5)));
for i = 1:length(data1)
xx = data1(i, 1);
yy = data1(i, 5);
zz = data1(i, 4);
if zz > data2(xx, yy)
data2(xx, yy) = zz;
end
end
b = bar3(data2);
set(b,'FaceColor',[1 0 0]);
clear data1 data2 i xx yy zz
XBins = {'5.0 - 5.5'; '5.5 - 6.0'; '6.0 - 6.5'; '6.5 - 7.0'; '7.0 - 7.5'; '7.5 - 8.0'; '8.0 - 8.5'; '8.5 - 9.0'};
set(gca,'xtick',[1:8],'xticklabel',XBins)
YBins = {'0 - 5'; '5 - 10'; '10 - 15'; '15 - 20'; '20 - 25'; '25 - 30'; '30 - 40'; '40 - 50'; '50 - 75'; '75 - 100'; '100 - 200'};
set(gca,'ytick',[1:11],'yticklabel',YBins)
xtickangle(290)
ytickangle(30)
hold off
Best Answer