Median
11.498 sec
Max
14.995 sec
TimeStep
0.005 sec
Variables:
EastWest: 1400x1 double
Values:
Min
-255.09
Median
-0.098
Max
244.51
NorthSouth: 1400x1 double
Values:
Min
-198.55
Median
1.078
Max
204.33
Vertical: 1400x1 double
Values:
Min
-157.88
Median
0.98
Max
134.46
Additional statistical information about the data can be calculated using varfun.This is useful for
applying functions to each variable in a table or timetable. The function to apply is passed to varfun
as a function handle. Below we apply the mean function to all three variables and output the result in
format of a table, since the time is not meaningful after computing the temporal means.
mn = varfun(@mean,dataOfInterest,'OutputFormat','table')
mn=1×3 table
mean_EastWest
mean_NorthSouth
mean_Vertical
_____________
_______________
_____________
0.9338
-0.10276
-0.52542
Calculate Velocity and Position
To identify the speed of propagation of the shockwave, we integrate the accelerations once. We use
cumulative sums along the time variable to get the velocity of the wave front.
edot = (1/200)*cumsum(dataOfInterest.EastWest);
edot = edot - mean(edot);
Below we perform the integration on all three variables to calculate the velocity. It is convenient to
create a function and apply it to the variables in the timetable with varfun. In this example, we
included the function at the end of this file and named it velFun.
vel = varfun(@velFun,dataOfInterest);
head(vel)
Loma Prieta Earthquake Analysis
10-45
11.498 sec
Max
14.995 sec
TimeStep
0.005 sec
Variables:
EastWest: 1400x1 double
Values:
Min
-255.09
Median
-0.098
Max
244.51
NorthSouth: 1400x1 double
Values:
Min
-198.55
Median
1.078
Max
204.33
Vertical: 1400x1 double
Values:
Min
-157.88
Median
0.98
Max
134.46
Additional statistical information about the data can be calculated using varfun.This is useful for
applying functions to each variable in a table or timetable. The function to apply is passed to varfun
as a function handle. Below we apply the mean function to all three variables and output the result in
format of a table, since the time is not meaningful after computing the temporal means.
mn = varfun(@mean,dataOfInterest,'OutputFormat','table')
mn=1×3 table
mean_EastWest
mean_NorthSouth
mean_Vertical
_____________
_______________
_____________
0.9338
-0.10276
-0.52542
Calculate Velocity and Position
To identify the speed of propagation of the shockwave, we integrate the accelerations once. We use
cumulative sums along the time variable to get the velocity of the wave front.
edot = (1/200)*cumsum(dataOfInterest.EastWest);
edot = edot - mean(edot);
Below we perform the integration on all three variables to calculate the velocity. It is convenient to
create a function and apply it to the variables in the timetable with varfun. In this example, we
included the function at the end of this file and named it velFun.
vel = varfun(@velFun,dataOfInterest);
head(vel)
Loma Prieta Earthquake Analysis
10-45
