Effacer les filtres
Effacer les filtres

Counting elements of a matrix/array

1 vue (au cours des 30 derniers jours)
Alex Flores
Alex Flores le 22 Avr 2017
Modifié(e) : Alex Flores le 22 Avr 2017
I have a 1000x1000 array of uniformly distributed random numbers between -1 to 1. I need to come up with a way to count how many negative numbers are generated are in the array without using loops. I was able to do it with loops, but I am struggling with trying to figure out how to do it without loops. any answer is very appreciated :)

Réponse acceptée

KSSV
KSSV le 22 Avr 2017
doc numel

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by