I have a data which oscillates around x-axis. How can I get x values for a given y value. I can get as many, I will sort the one required.

Thank you.

Skip to content# MATLAB: Finding x value for given y in a zig-zag data.

###### Related Question

finding x valuesMATLAB

I have a data which oscillates around x-axis. How can I get x values for a given y value. I can get as many, I will sort the one required.

Thank you.

- I have X vector and Y vector. I have plotted graph. Now I sorted out some peak values (from Y). Stored in pks. Now, corresponding to these peaks values(pks), how I can find its corresponding X values
- Create sparse matrix with zig-zag diagonal
- Remove peaks below a threshold using findpeaks function
- Create coordination matrix from zig zag path

## Best Answer