clear,clc;
global k m n u0 uv0 P;
%适用前提:自由度从上向下排序
% *****************变量输入*****************
n=3; %输入自由度
k=9.6*(10^7)*[1 -1 0;-1 2 -1;0 -1 2]; %输入刚度矩阵
m=100000*[1 0 0;0 1.5 0;0 0 2]; %输入质量矩阵
u0=[0 0 0]'; %初始位移向量
uv0=[0 0 0]'; %初始速度向量
e=0; %阻尼比
% *****荷载向量构造*****
syms T;
p=[0;1;0];
f=4;
p1=subs(sym('30000*sin(2*pi*f*T)'));
p2=subs(sym('p'));
P=p1*p2; %P是荷载向量,是一个以t为变量的符号表达式
% *****荷载向量构造*****
vib_meh=2; %选择振动分析方法,‘1’为特征多项式法,‘2’为矩阵迭代法
vinf_plot=1; %选择是否输出振动特性分析的图,‘1’为是,‘0’为否
% *****************变量输入*****************
if vib_meh==1
[w,V]=Characteristic_polynomial; %特征多项式法
elseif vib_meh==2
dd=50; %输入迭代次数
[w,V]=Matrix_iteration(dd); %矩阵迭代法
end
%解出频率向量w,特征向量组V
% *****************振动分析出图*****************
if vinf_plot==1
figure(1);
for i=1:n
subplot(1,3,i);
y=0:1:3;
v_sort(:,i)=V(:,i)/(V(1,i));
x_1=v_sort(:,i);
x_2=[zeros(1);x_1];
plot(x_2,y);
title(strcat('w',num2str(i),'=',num2str(w(:,i))));
max_v=max(abs(v_sort(:,i)));
min_x=-max_v-1;
max_x=max_v+1;
axis([min_x,max_x,0,n+0.1]);
set(gca,'YTick',0:1:n);
for y2=1:3
x2=num2str(v_sort(y2,i));
text(x_1(y2,:),y2,x2);
end
end
end
% *****************动力反应求解*****************
[Y]=Duhamel(w,V,e);
% t=100:0.01:100.5;
% figure(2);
% for i=1:n
% y=@(t)Y(i);
% plot(t,double(subs(y(i))));hold on;
% end
% s=0;
% for t=0.1:0.1:10
% s=s+1;
% for i=1:3
% y=@(t)Y(i);
% yy(i,:)=double(subs(y(t)));
% end
% yy=[yy(1);yy(2);yy(3)];
% vv(:,s)=V*yy;
% end
% figure(2);
% t=0.1:0.1:10;
% plot(t,vv(1,:));
% figure(2);
% for i=1:n
% subplot(3,1,i);
% y1=@(t)subs(V(i,1)*Y(1));
% Y1=real(double(y1(t)));
% plot(t,Y1,'r');hold on;
% y2=@(t)subs(V(i,2)*Y(2));
% Y2=real(double(y2(t)));
% plot(t,Y2,'g--');hold on;
% y3=@(t)subs(V(i,3)*Y(3));
% Y3=real(double(y3(t)));
% plot(t,Y3,'b-.');
% xlabel('t(s)');
% ylabel('u(m)');
% title(strcat('f=',num2str(f),'Hz,各阶振型响应对楼板',num2str(i),'的贡献时程'));
% legend('1st','2nd','3rd');
% axis([100,100.5,-5*(10^(-3)),5*(10^(-3))]);
% end
多自由度.zip_diameter5rq_naturalm5y_动力响应_多自由度_;振型叠加
版权申诉
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
![avatar](https://profile-avatar.csdnimg.cn/271c0f59ce4e427783f4849fb0aeba2e_weixin_42662171.jpg!1)
林当时
- 粉丝: 102
- 资源: 1万+
最新资源
- 【哈工大计算机系统】CSAPP计统大作业
- 音视频对齐python脚本
- Tkinter简易版学生信息管理系统源码+数据库配置文件
- Advanced Sniper Starter kit v4.3.unitypackage
- tensorflow-gpu-2.8.3-cp37-cp37m-win-amd64.whl
- tensorflow-2.8.4-cp37-cp37m-win-amd64.whl
- tensorflow-2.8.3-cp37-cp37m-win-amd64.whl
- 仿微博发贴,评论帖子,回复评论,后端mysql数据库表设计.md
- 618电商活动的Python网页程序+编程知识+技术开发
- 简单的网页重复操作2.25
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)