Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有什么聪明的方法可以将排序的向量分成两部分的价值条件?
A = [5 4 4 4 3 3 2 1];
我想要两个向量,一个包含所有大于 3 的数字,另一个包含剩余数字。arrayfun 是这个问题的唯一解决方案吗?
B = A(A >= val); C = A(A < val);