作者peterwu76 (r!cH* 钢)
看板MATLAB
标题Re: [问题] 重新问一遍,这样图怎麽画的?
时间Wed Sep 26 14:39:42 2012
※ 引述《starmoon0918 (恐怖の孤独)》之铭言:
题目是 :
将一物体斜向抛往空中至落地。初速度Vo,角度θ,求其过程所经历之时间、
高度变化、上升下降速度之变化。并画图之,横轴为时间、纵轴为高度与速度。
V(t)=Vosinθ-gt
h(t)=Vosinθt-1/2gt^2
t=2Vosinθ/g
要画出下面之图形
http://ppt.cc/BJkj
--
角度跟V0初速应该给定值,
会变动的则是时间。
我物理很烂,不过你应该要的是下面的这个?
clc
clear all
g=9.8; % gravitivy = 9.8 (m/s^2)
theta=45; % set Angle = 45 degree;
Vo=25; % set V0=25 (m/s);
% t=2*Vo*sind(theta)/g;
t=0:0.1:10; % Time: from 0 to 10; interval=0.1 second
V=Vo*sind(theta)-g*t; % Velocity (m/s)
h=Vo*sin(theta).*t-0.5*g*t.^2; % Height (m)
figure;
plot(t,V','color',[1 0 0]);hold on
plot(t,h,'color',[0 0.5 0]);
% The followings are just used to make the figure being more readable
eval(strcat('legend(''Velocity (m/s); where V_0 = ',num2str(Vo),'(m/s)'',
''Height (m); where theta =',num2str(theta),'degree'',1,2,''location'',
''Southwest'');'))
% 断掉的部分请自行接上。
axis ([-1 5 -30 30])
xlabel('Elapesed time (second)','FontSize',12);
ylabel('Height (m) & Velocity (m/s)','FontSize',12);
grid on
% Hope this would be helpful to you
--
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
--
※ 编辑: peterwu76 来自: 140.112.1.187 (09/26 14:40)