Construct an array from the position of a certain value in a matrix
1 view (last 30 days)
Let's assume we have a matrix, which I attach, matrix.dat, which has 220x200 elements (https://we.tl/t-KwSPQEsCtf link to download the aformentioned matrix). This matrix would correspond to the definition of two physical quantities, given by
What I am looking for is that, when there is, for a time element, a value in the matrix that is equal to 1.5708, the value of the first field element is stored in a new array. As you can see, for the first elements of time, there is no matrix value that matches the aforementioned value of 1.5708. So I don't know beforehand what the dimension of my vector will be, ?x1 elements. Is there an efficient way to build the above array?