Académique Documents
Professionnel Documents
Culture Documents
HOMEWORK NO. 2
COMPUTER PROGRAMS PORTFOLIO
Author:
May 2016
Problem no. 1
1. Requirements
Draw the accelerations recorded during the Vrancea 1977 Earthquake.
2. Analysis
The file is named VRAN.ACC and contains the Vrancea EW,NS and UD components.
3. Computer program
For obtaining the requirements a Matlab computer program was conceived.
% author:
% master: Structural Engineering
% topic: Advanced Earthquake Engineering
% academic year: 2015-2016
close all
clear all
disp('Graph of Vrancea Earthquake 1977')
load vran.acc
[n,m]=size(vran);
% sampling time
step=0.01; % seconds
time=0:step:(n-1)*step; % time interval
ew=vran(:,1);
h11=figure;
set(h11,'color',[0.8 0.6 0.5]) % culoarea exteriorului graficului
h12=plot(time,ew,[0,time(end)],[0,0]);
set(h12(1),'LineWidth',1.5,'color',[0.8 0.1 0.1])
set(h12(2),'LineWidth',2.5,'LineStyle','-.')
h13=xlabel('Time(sec)');
set(h13,'FontName','Times','FontSize',14)
h14=ylabel('Acceleration (cm/sec^2)');
set(h14,'FontName','Times','FontSize',14)
h15=title('Vrancea Earthquake 1977, East-West component');
set(h15,'FontName','Times','FontSize',18)
h16=text(time(imax),maxy,['-- max=',num2str(maxy),'cm/s^2 at
time=',num2str(time(imax))]); % valoarea maximului de pe grafic cu fct num2str
si timpul inregistrat
set(h16,'FontName','Times','FontSize',12)
h17=text(time(imin),miny,['-- min=',num2str(miny),'cm/s^2 at
time=',num2str(time(imin))]); % valoarea minimului de pe grafic cu fct num2str
si timpul inregistrat
set(h17,'FontName','Times','FontSize',12)
ns=vran(:,2);
figure
plot(time,ns,[0,time(end)],[0,0])
ud=vran(:,3);
figure
plot(time,ud,[0,time(end)],[0,0])
4. Results
The results are the graphs shown below.
100
Acceleration (cm/sec )
2
50
-50
-100
-- min=-126.12cm/s 2 at time=3.07
0 2 4 6 8 10 12 14 16 18 20
Time(sec)
5. Comments
The requirements have been obtained using Matlab and the graph’s results have been presented.