Timestep simulation for finding velocity and acceleration by basic formulae

Hello, I want to write the program for timestep simulation. t = [0:0.1:0.9] or you can take t = [0:1:10] in secs u = 40; % initial velocity in m/s a = 2.9430; % acceleration in g value. now i want the final velocity 'v' after time 0.9secs/10secs. formula is v = u + a*t and i also want the distance travelled and formula for it is s = (u*t) + 0.5*a*t^2 I want this in for loop. and i am not able to put it in for loop. i am new to programming. please can anyone help me get this program? Thank You

5 件のコメント

Adam
Adam 2017 年 6 月 8 日
What is your particular difficulty with it? It seems like a fairly trivial problem.
Chetak Satav
Chetak Satav 2017 年 6 月 8 日
編集済み: Chetak Satav 2017 年 6 月 8 日
sorry i forgot to mention one thing and that is i want this in for loop. and i am not able to put it in for loop. i am new to programming.
Chetak Satav
Chetak Satav 2017 年 6 月 8 日
i am not able to put it in for loop
Adam
Adam 2017 年 6 月 8 日
Well, the obvious next question is why aren't you able to put it in a for loop?
Since this sounds like a homework question you must surely have been introduced to for loops on whatever course you are on, or at the very least how to navigate the help to find examples, such as
doc for
James Tursa
James Tursa 2017 年 6 月 8 日
What have you done so far? What specific problems are you having with your code?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

2017 年 6 月 8 日

コメント済み:

2017 年 6 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by