How to find the location of a value in a array?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have four sets of values y(211*61), z(211*61), pyy(1*211), pzz(1*211). Please refer the attached excel file. I have to locate for every value in pyy and pzz two values(one greater than and one less than y and z respectively) for every row of y and z.
For the location, values both in y and z must satisfy the condition. Now, consider the first value in pyy is 0 and in pzz is -138.5. then, for the corresponding values, I get the location in 1st row of y and z as 46 and 47th column number.
In every y and z row the condition is satisfied twice,but it is satisfied together only at one location as can be seen from the example above.
Any help would be appreciated. Thanks in advance.
댓글 수: 3
Jan
2018년 6월 5일
Is your problem solved? If not, I have to admit, that I do not understand the explanation:
- Values cannot be "less then and greater then". Do you mean: "not equal"?
- "the two values in y(1,61)" - y(1, 61) is a scalar, such that it cannot contain 2 values.
- What does "in the proximity of 0" mean?
- "from the two set of values for y and z, one set is same for both, here 46 and 47th." - I have no clue, what this means.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Dijkstra algorithm에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!