How to determine the dominant sign of the various entities present in an array?

1 view (last 30 days)
As in, whether maximum entities in the array are positive or negative.

Answers (1)

Star Strider
Star Strider on 15 Oct 2014
One way:
x = randi(10,10,5)-4; % Create Data
xn = numel(x(x<0)); % Number Of Negative Elements

Categories

Find more on Data Types in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!