Re: [問題] 重新問一遍,這樣圖怎麼畫的?
※ 引述《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)
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):