MATLAB: How to interpolate mooring data and creat a Longitude-depth profile.

interpolation

I want to interpolate mooring data, creating more depths and temperatures values . The buoys are located in diferents longitudes (0ºN35ºW, 0ºN23ºW, 0ºN10ºW and 0ºN0ºE) .What function i have to use?
This is a example of the data:
35W = [ 12 0 28.25 28.09 27.41 25.57 21.77 17.94 15.83 14.49 13.22 ]
depth35W= [1 20 40 60 80 100 120 140 180 300 500 ]
23W = [24.97 24.96 25.11 24.92 24.15 22.50 19.75 17.30 15.69 14.81 13.90 10.83 7.23]
depth23W= [1 5 10 13 20 40 60 80 100 120 140 180 300]
10W = [23.24 23.78 23.68 22.55 20.54 18.12 16.57 15.61 15.03 14.59 13.96 10.60 7.31]
depth10W= [1 5 10 20 40 60 80 100 120 140 180 300 500]
0E = [25.25 24.80 18.18 16.35 15.61 15.18 14.88 14.70 14.29 10.79 7.31]
depth0E= [1 20 40 60 80 100 120 140 180 300 500 ]

Best Answer

I am not certain what you want as a result.
Try this:
temp35W = [ 12 0 28.25 28.09 27.41 25.57 21.77 17.94 15.83 14.49 13.22 ];
depth35W= [1 20 40 60 80 100 120 140 180 300 500 ];
newDepth = linspace(min(depth35W), max(depth35W), 250);
newTemp = interp1(depth35W, temp35W, newDepth, 'pchip');
figure
plot(depth35W, temp35W, 'p')
hold on
plot(newDepth, newTemp, '-r')
hold off
grid
See the douumentation on interp1 for more information.