フィルターのクリア

How can i create a vector having 6 values between two numbers

10 ビュー (過去 30 日間)
Amjed Bakhsh
Amjed Bakhsh 2020 年 10 月 10 日
コメント済み: Amjed Bakhsh 2020 年 10 月 11 日
How can i create a vector having 6 values between 2 and 12 including the end points 2 and 12?

回答 (1 件)

Sindar
Sindar 2020 年 10 月 10 日
Assuming you want them evenly spaced:
x = linspace(2,12,6);
If you want them randomly spaced
x = [2 ; 2+(12-2)*rand(4,1) ; 12]

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by