Compare column vector to matrix
古いコメントを表示
Hello,
I'm trying to find the first element and its index into a 73X615 matrix, where each value should be less or equal to a value in 73X1 column vector. So let's say that the matrix is
B = -5 + (5+1)*rand(73,615);
and the vector is
A = -5 + (5+1)*rand(73,1)
My intention is to extract a columns vectors [C, iC], where each value of C is the first value in B that is less or equal than the value in A at the corresponding row, and iC is the index of that value.
My apologies if the question seems a bit contrived, but I'm new to Matlab and I didn't know how to formulate it more clearly.
I hope you can help me with this issue, before hand, many thanks.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Data Type Identification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!