How can I create an array of 100 elements
16 次查看(过去 30 天)
显示 更早的评论
How can I create an array of 100 elements with n-th element valued as 1 / √(2n^2)
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!