How to split a vector based on using another value?
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I wish to split a vector into two separate vectors based on whether they are higher than a pre-defined value.
For example, A=[10,9,8,7,6,5,4,3,2,1] and a=4. Then I want to split 'A' into one vector where all the values are higher than 'a' and another vector with the remaining values.
So that I can get B=[10,9,8,7,6,5] and C=[4,3,2,1].
Any help would be greatly appreciated.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!