フィルターのクリア

Counting elements of a matrix/array

1 回表示 (過去 30 日間)
Alex Flores
Alex Flores 2017 年 4 月 22 日
編集済み: Alex Flores 2017 年 4 月 22 日
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 :)

採用された回答

KSSV
KSSV 2017 年 4 月 22 日
doc numel

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by