%% This is to calculate the
average of TEST3 and plot
% for TEST301, cable71-cable51;
Notice: cable84-column16, need for revising
�fine the initial
value
x=0;row=2;n=1;a=1;i=2;r=2;column=3;
indexendrow=size(TEST301,1);
%get the row number
loopnumber=indexendrow/20+3;
%find the number of
loop
%loop
for column =3:38
for row = 2:loopnumber
for n =1: 20
%set 20number a group
if i==indexendrow+1
%set stop point
n=21;
else
x=TEST301(i,column)+x;
%get the value in each
column
i=i+1;
end
end
avg301(r,column)=x/20;
%get the average and assume to
avg table
x=0;
r=r+1;
end
% i value must be 2 (a inital
value) for a new loop within column, same g, x
i=2;
r=2;
x=0;
end
%% analysis and plot all average
data for TEST3
% reference, one location with
three plots
% 1.Stringer stress in various
locations through the span of bridge
�ble
85 to 102
stage I
%colunm 17 to 38
stage I
% scale factor: 21874, unit:
PSI
% 2.Stringer longitudinal bottom
and top stress for stageI and stageII
�ble
46 47 50 51
%colunm 35 36 37 38
%scale factor: 21874, unit:
PSI,
%stageI
46,47(35,36)
%stageII 50,51(37,38)
%% plot all cable, truck
position: S, speed: 5, 15, 30
sf=21874; %scale factor
cableNO1=85; cableNO2=46;
cableNO3=50;
%plot1 cable 85-102 (col
17-34)
for col=17:34
figurename =
sprintf('Cable %d', cableNO1);
cableNO1=cableNO1+1;
figure('name',figurename);
hold on
plot(avg300(2:end-2,col)*sf,'r');
plot(avg301(2:end-2,col)*sf,'b');
plot(avg302(2:end-2,col)*sf,'y');
hold off
title(figurename);
xlabel('Time unit: S
');
ylabel('Stress unit: PSI');
legend('S-5','S-15','S-30');
end
%plot 2 cable 46,47(col 35
36)
for col=35:36
figurename =
sprintf('Cable %d', cableNO2);
cableNO2=cableNO2+1;
figure('name',figurename);
hold on
plot(avg300(2:end-2,col)*sf,'r');
plot(avg301(2:end-2,col)*sf,'b');
plot(avg302(2:end-2,col)*sf,'y');
hold off
title(figurename);
xlabel('Time unit: S
');
ylabel('Stress unit: PSI');
legend('S-5','S-15','S-30');
end
%plot3
cable 50,51 (37 38)
for col=37:38
figurename =
sprintf('Cable %d', cableNO3);
cableNO3=cableNO3+1;
figure('name',figurename);
hold on
plot(avg300(2:end-2,col)*sf,'r');
plot(avg301(2:end-2,col)*sf,'b');
plot(avg302(2:end-2,col)*sf,'y');
hold off
title(figurename);
xlabel('Time unit: S
');
ylabel('Stress unit: PSI');
legend('S-5','S-15','S-30');
end
%% plot to compare
。。。