?? 地震波反應譜計算程序.m
字號:
function [x]=rspsp(damping,eqw,T)
%
% function [x]=rspsp(damping,eqw,T)
% Purpose: To calculate response spectrum of EQW
% damping 阻尼比
% eqw 地震波,地面加速度時程. 應具有兩列[t,u]
% 當 eqw 是向量時,則認為eqw(1)是時間間隔
% T 向量,周期
% x 計算結(jié)果,共三列,分別為位移,速度,加速度反應譜
% Note: What we calulate are called Pseudo-velocity response
% spectrum and Pseudo-acceleration response spectrum.
% Author: hjdwg@0451.com 98-11-25 15:57
%
if nargin ~= 3 ,error('Nargin ~=3');end
[s1,s2]=size(eqw);
if s2>2,error('Illegal eqw format');end
if s2==2,
u=eqw(:,2);
t=eqw(:,1);
end
if s2==1,
t=eqw(1)*(0:s1-2);
u=eqw(2:s1,1);
end
x=zeros([length(T),3]);
w=2*pi./T;
for i=1:length(w)
SYS=tf(1,[1,2*damping*w(i),w(i)*w(i)]);
x(i,1)=max(abs(lsim(SYS,u,t)));
end
x(:,2)=x(:,1)*2*pi./T(:);
x(:,3)=x(:,2)*2*pi./T(:);
return
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -