File Exchange

## nagyprism(x1,x2,y1,​y2,h,rho)

version 1.0.0.0 (1.88 KB) by Jack

### Jack (view profile)

A function file to compute Nagy prism terrain corrections

Updated 26 May 2016

A function to perform terrain corrections using the Nagy prism formula.
To calculate the terrain correction for a block of topography
with coordinates (x1,y1) (x2,y1) (x1,y2) (x2,y2) in the x,y plane and
height h all in metres.
.....................................................
..................__________...............
................/!.................../!↑.............
............../_!________./..!↑.............
..............!..!................!...!h ............
..............!..!................!...!↓.............
..............!..!................!...!↓.............
..............!..!................!...!↓.............
..............!..!(x1,y2).....!_.!(x2,y2)....
..............!./.................!./................
(x1,y1)...!/_________!/(x2,y1).....

with density rho in Mg/m3, the terrain correction T is given by
T = nagyprism(x1,x2,y1,y2,h,rho)

The function can also handle vectors of coordinates, x1,x2,y1,y2,h so that the total correction for multiple pieces of terrain can also be calculated at once.

### Cite As

Jack (2020). nagyprism(x1,x2,y1,y2,h,rho) (https://www.mathworks.com/matlabcentral/fileexchange/57349-nagyprism-x1-x2-y1-y2-h-rho), MATLAB Central File Exchange. Retrieved .

Jack

### Jack (view profile)

The x_1 x_2 y_1 y_2 coordinates of the prism of topography are relative to the computation point which is at the origin (0,0).

Hope this clears up these questions.

Cheers,

Jack

Harshpal Singh

### Harshpal Singh (view profile)

Hello Jack,
I am confused on how do you relate the terrain correction of the prism grid to the station you are calculating terrain correction at?
Thanks, - Harshi

Philip

### Philip (view profile)

Jack,

At what point (co-ords) is the terrain correction applicable for (each) the rectangular prism?

Thx. - Paul