フィルターのクリア

How do I make a vector containing 30 cells that range from -5 to 45?

3 ビュー (過去 30 日間)
Brianna Miranda
Brianna Miranda 2022 年 2 月 24 日
回答済み: Scott MacKenzie 2022 年 2 月 24 日
I need to create a vector of length 30 with values that range from -5 to 45:
[-5...........................................45] where n=30. How can I do this?

採用された回答

Scott MacKenzie
Scott MacKenzie 2022 年 2 月 24 日
randi([-5 45],1,30)
ans = 1×30
-2 21 11 35 5 35 1 45 34 -5 -4 43 12 38 17 14 3 41 21 35 0 26 27 29 33 41 1 8 36 4

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by