function c=depths(z) depths= 1.e-3*[0. 150. 300. 450. 600. 750. 900. 1050. 1200. ... 1500. 1800. 2100. 2400. 2700. 3000. 3300. 3600. ]; speeds= [ 1.537 1.523 1.509 1.490 1.484 1.482 1.483 1.484 ... 1.486 1.486 1.489 1.495 1.499 1.503 1.508 1.515 1.521 ]; d=splin(depths, speeds); c= interp(z, depths, speeds, d); endfunction function cp=depthsp(z) depths= 1e-3*[0. 150. 300. 450. 600. 750. 900. 1050. 1200. ... 1500. 1800. 2100. 2400. 2700. 3000. 3300. 3600. ]; speeds= [ 1.537 1.523 1.509 1.490 1.484 1.482 1.483 1.484 ... 1.486 1.486 1.489 1.495 1.499 1.503 1.508 1.515 1.521 ]; d=splin(depths, speeds); [c, cp]= interp(z, depths, speeds, d); endfunction