vector with spacing (predefined)

2 ビュー (過去 30 日間)
Venkata Brahma Teja Haridasu
Venkata Brahma Teja Haridasu 2021 年 4 月 18 日

採用された回答

David Fletcher
David Fletcher 2021 年 4 月 18 日
Maybe I am missing something, but this?
initial_value=-25;
step_size=5;
final_value=15;
vector=initial_value:step_size:final_value

その他の回答 (1 件)

the cyclist
the cyclist 2021 年 4 月 18 日
Does
v = -25:5:15
v = 1×9
-25 -20 -15 -10 -5 0 5 10 15
do what you want? Or maybe you meant
initial_value = -25;
step_size = 5;
final_value = 15;
v = initial_value : step_size : final_value
v = 1×9
-25 -20 -15 -10 -5 0 5 10 15
If neither of those is what you meant, then I don't understand.
  1 件のコメント
the cyclist
the cyclist 2021 年 4 月 18 日
Also, you might learn a lot from the MATLAB Onramp.

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

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by