MATLAB: How to make specific point the origin

originvector

I have two column vectors (they hold longitude and latitude data) and I need to make the easternmost point my origin.
lat=[36.4050
36.4054
36.4096
36.4099
36.4100
36.4147
36.3706
36.3657
36.3538
36.3450
36.3329
36.3237
36.3109
36.3037
36.3035
36.3036
36.3044
36.3058
36.3061
36.3081
36.3090
36.3077
36.3090
36.3113
36.3134
36.3162
36.3180];
long=
[116.7822
116.7675
116.7518
116.7352
116.7126
116.7216
116.8170
116.8452
116.8537
116.8638
116.8724
116.8856
116.8897
116.8940
116.9031
116.9117
116.9203
116.9289
116.9372
116.9435
116.9529
116.9600
116.9688
116.9782
116.9856
116.9940
116.9973]
I want lat(27,1) and long(27,1) to be my origin for future calculations (I will be finding distance between points).
Help!

Best Answer

[~, idx] = max(long);
base_point = [lat(idx), long(idx)]