format compact;
%
t = 0: 0.1: 2.0; % time in seconds
m = 0.709; % Mass of capsule in Kilograms
F = 62.9 - 60; % Force in Newtons
v0 = 0; % Initial velocity is zero
%
acc = F./m % Acceleration in meters/second
x = t.*v0 + acc.*t.^2 % Position in meters
%
v = v0 + t.*acc; % Velocity in meters/second
%
a = 2.*(v.*t - x)/t.^2 % Acceleration in meters/square second
%
Table = [t', x', v', a'];
fprintf ('\n');
disp (' Time,s Position,m Velocity,m/s Acceleration,m/s2');
fprintf ('%9.2f s%10.2f m%10.2f m/s%15.3e m/s2 \n', Table')
why calculation for a is wrong?

 採用された回答

madhan ravi
madhan ravi 2019 年 2 月 27 日

0 投票

a = 2.*(v.*t - x)./t.^2
% ^---- missed it

1 件のコメント

Nuong Bui
Nuong Bui 2019 年 2 月 27 日
Thanks a lot.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

質問済み:

2019 年 2 月 27 日

コメント済み:

2019 年 2 月 27 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by