compare integer values
古いコメントを表示
How i can compare between each element in specific matrix and constant value as 0.5 and then take action if the result true .
採用された回答
その他の回答 (1 件)
Honglei Chen
2012 年 2 月 15 日
Say you have the matrix A, and you have a function foo contains the operation you'd like to apply to elements of A if they equal to 0.5, you can do
A(A==0.5) = arrayfun(@foo,A(A==0.5))
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!