Logical Indexing with Condition Involving Functions
4 ビュー (過去 30 日間)
古いコメントを表示
Suppose I created a function F, and I want to find all elements a in an array A such that F(a) is some value of the function. Is there any way to do this with logical indexing (or some other method)? I tried to use idx = (F(A) == 1), but it has been giving me error messages about different numbers of elements. Thanks in advance!
2 件のコメント
Stephen23
2021 年 5 月 5 日
"but it has been giving me error messages about different numbers of elements"
Please show the complete error message. This means all of the red text.
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!