calculate x coordinate from x-station in matlab

If you have the x-coordinate of a station and you want to calculate the x-coordinate of a point using the distance between them, you can use the following formula:

main.m
x_point = x_station + distance;
32 chars
2 lines

For example, if the x-coordinate of the station is 5 and the distance to the point is 3, then the x-coordinate of the point would be:

main.m
x_point = 5 + 3;
17 chars
2 lines
main.m
x_point = 8;
13 chars
2 lines

Of course, you would replace the values with the actual x-coordinate of the station and the distance you want to use for the calculation.

gistlibby LogSnag