Given a non-empty vector x with integer elements. x shall be called balance vector if one can split the elements of x into two groups which are in total equal. e.g.
x=[1,1] balance vector because 1=1
x=[1,7] non-balance vector because 1~=7
x=[2,3,5] balance vector because 2+3=5
Write a function that returns true or false depending if the given vector is a balance vector or not!
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers34
Suggested Problems
-
Find the largest value in the 3D matrix
1677 Solvers
-
755 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
400 Solvers
-
Find the position of first minimum value in an integer array with numbers
185 Solvers
-
ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
601 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
See Problem 74. Balanced number in the same spirit.