How can I create an array of 100 elements

14 ビュー (過去 30 日間)
SP
SP 2018 年 10 月 15 日
編集済み: madhan ravi 2018 年 10 月 15 日
How can I create an array of 100 elements with n-th element valued as 1 / √(2n^2)

採用された回答

madhan ravi
madhan ravi 2018 年 10 月 15 日
編集済み: madhan ravi 2018 年 10 月 15 日
n=1:100
sequence = 1 ./ sqrt(2*n.^2)
Or
syms n
s=1:99
sequence = 1 ./ sqrt(2*n.^2)
array =[ s sequence ]
array = subs(array,n,3)

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by