replace find instruction for more fast precedure

I have a very long vector close to 100.000 values, well I need to know wich of them are == x, but "find" instruction it´s very delayded,¿How can I get fast speed or replace find ?
But I need the pointers of vector, not values!

回答 (1 件)

Adam
Adam 2016 年 10 月 25 日

0 投票

myVec( myVec == x );
gives you a boolean indicator array of all those that match the expression, but it depends what you want to do with the information as to how best to use that.

1 件のコメント

Felipe Vidal
Felipe Vidal 2016 年 10 月 27 日
I find the problem, if you give a column vector to function find, it takes alot of time to run, but if you give a row vector, it runs efficiently. I dont know why.
Tanks for your answer.

サインインしてコメントする。

カテゴリ

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

製品

タグ

質問済み:

2016 年 10 月 25 日

コメント済み:

2016 年 10 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by