How to extract random elements from an array?
显示 更早的评论
For eg., I have a 1d array, d=[1;3;4;6;8;7;8;9;6;7] and I need to extract the first, third and sixth variable. How do I do that?
1 个评论
Stephen23
2019-12-23
"I need to extract the first, third and sixth variable."
There is only one variable, the vector d.
The vector d has elements, and most likely you are trying to extract those elements.
采纳的回答
更多回答(1 个)
Badavath Swetha
2021-6-28
编辑:Badavath Swetha
2021-6-28
0 个投票
d ([1 3 6])
类别
在 帮助中心 和 File Exchange 中查找有关 Elementary Math 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!