matlab画图数据分析,试验数据处理matlab画图

%% 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

。。。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值