フィルターのクリア

Given that t is in increments 0.1 and goes from 0 to 20, how can I make a variable that consists of 5t^2?

10 ビュー (過去 30 日間)
First I made x as:
>> t = 0:0.1:20
I have tried numerous ways to get a variable consisting of 5t^2 and have the same result. It ends up generating a 1x201 row vector with values from 0 to 2.
I believe it is only multiplying 5 by the 0.1 increment but not the actual values. Any solutions?
  2 件のコメント
jessupj
jessupj 2020 年 9 月 14 日
編集済み: jessupj 2020 年 9 月 14 日
5.*(0:0.1:20).^2
also perhaps try to adjust the way the output is showing, since the results are in range [0,2000] and it may look like [0,2] with a multiplier
format long g
Tyler Bodnarik
Tyler Bodnarik 2020 年 9 月 14 日
It was a formatting issue I've got it now. Thank you!!

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

回答 (1 件)

David Hill
David Hill 2020 年 9 月 14 日
  1 件のコメント
Tyler Bodnarik
Tyler Bodnarik 2020 年 9 月 14 日
For some reason its not giving me what 5t^2 should be. It keeps giving me a 1x201 row vector with values 0 to 2. It should have all the values of t get squared and multiplied by 5.

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

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by