📄 chap2_ex7_1.m
字号:
% Chap2_Ex7_1.m
clear all
clc
close all
m=2; mu0=0.3; muS=0.1; g=32.2;
fB=mu0*m*g;
fS=muS*m*g;
t1=1;
T=0.025;
Tf=(0.25*t1/muS)*(7*mu0+2*muS);
nf=round(Tf/T);
t(1)=0;
vA(1)=0;
f(1)=0;
fmu(1)=0;
for n=2:nf
t(n)=(n-1)*T;
if t(n)<=0.5*t1
f(n)=2*fB*t(n)/t1;
fmu(n)=f(n);
elseif t(n)>0.5*t1 & t(n)<=t1
f(n)=2*fB*t(n)/t1;
fmu(n)=fS;
elseif t(n)>t1 & t(n)<=2*t1
f(n)=2*fB*(2-t(n)/t1);
fmu(n)=fS;
else
f(n)=0;
fmu(n)=fS;
end % if
vA(n)=vA(n-1)+(T/m)*(f(n)-fmu(n));
end % n
freq=4;
subplot(2,1,1)
plot([0 1 2 6],[0 max(f) 0 0],'k')
axis([0 6 -3 42])
ylabel('\itf \rm(lbs)','FontSize',11)
text(2,33,'\itm\rm = 2 slugs, \mu_{0}= 0.3, \mu_{\its} = 0.1','FontSize',11)
text(2.75,13,'\itt\rm_1 = \rm1 sec','FontSize',11)
text(2.75,23,'\itf_{B} \rm= \mu_{0}\itmg','FontSize',11)
title('Applied Force','FontSize',11)
subplot(2,1,2)
plot(t(1:freq:end),vA(1:freq:end),'.r')
axis([0 1.0*Tf -1 13])
hold on
xlabel('\itt \rm(sec)','FontSize',11)
ylabel('\itv_{\rmA}\rm(\itn\rm) (ft/sec)','FontSize',11)
text(1.5,5,'\itT\rm = 0.025 sec','FontSize',11)
title('Velocity','FontSize',11)
ti=[0 0.5*t1];
vi=[0 0];
plot(ti,vi,'k')
hold on
ti=linspace(0.5*t1,t1,250);
a=g*mu0/t1;
b=-g*muS;
c=g*(2*muS-mu0)*t1/4;
vi=a*ti.^2 + b*ti +c;
plot(ti,vi,'k')
a=-mu0*g/t1;
b=(4*mu0-muS)*g;
c=(-0.25*g*t1)*(9*mu0-2*muS);
ti=linspace(t1,2*t1,250);
vi=a*ti.^2 + b*ti +c;
plot(ti,vi,'k')
Tf=(0.25*t1/muS)*(7*mu0+2*muS);
b=-muS*g;
c=(0.25*g*t1)*(7*mu0+2*muS);
ti=linspace(2*t1,Tf,250);
vi=b*ti + c;
plot(ti,vi,'k')
text(4.2,10.5,'\itv_{A}\rm(\itn\rm), \itn \rm= 0,4,8,...','FontSize',11)
plot(4,10.5,'r.')
text(4.2,8,'\itv\rm(\itt\rm)','FontSize',11)
plot([3.9 4.1],[8 8],'k')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -