How to get XYZ data in equal interval

2 views (last 30 days)
Hello everyone!
I have a data which is in xyz form: x and y are distance measurements and z is the coresponding value. Now, there is some interval value in x and y, and I would like to have a new xyz data format in which 'x ' and 'y' should be equally spaced at every interval value of '20' (e.g. 0 20 40 60........4300) and the correspinding value of 'z' is also required. The data format that need to be prepared in equal interval is given below:
-----------------------------------------------------------------------------------------------------------
X Y Z
0 4382.26782195 65.0035629272
19.3784664354 4382.26782195 68.5368804932
38.7569328709 4382.26782195 68.5358276367
58.1353993063 4382.26782195 65.6181640625
77.5138657418 4382.26782195 61.0104675293
96.8923321772 4382.26782195 56.1530647278
116.270798613 4382.26782195 52.3486099243
.......
........
.........
4302.01954867 4382.26782195 -231.189361572
0 4362.52787681 80.1672363281
19.3784664354 4362.52787681 84.5006332397
38.7569328709 4362.52787681 84.704826355
58.1353993063 4362.52787681 81.1916122437
77.5138657418 4362.52787681 75.3585586548
96.8923321772 4362.52787681 69.1199645996
.............
...............
..............
-----------------------------------------------------------------------------------------------------------
I would greatly appreciate your time and help.
Thanks in advance.

Accepted Answer

KSSV
KSSV on 28 Jul 2020
Read about griddata, scatteredInterpolant.
  1 Comment
Rock Interpreter
Rock Interpreter on 31 Jul 2020
Would you please mind in providing the script since I am beginner in this? Thanks in advance.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!