How to find the location of a value in a array?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Jan
el 5 de Jun. de 2018
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.
Respuestas (0)
Ver también
Categorías
Más información sobre Dijkstra algorithm en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!