Find the negative entries in a array.

Hi everybody! I am new to Matlab and I have been using it for like one week. Now I got stuck because I need to individuate the negative entries of an array in order to modify them: I wonder then if there's a way to get the position (row and column) of these entries in the array of interest.
Thanks in advance!

回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 3 月 31 日

2 投票

E, use
[row col] = find(a<0)

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

質問済み:

E
E
2014 年 3 月 31 日

回答済み:

2014 年 3 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by