How do you create arrays with matching first columns, where the depth profiles in the separate arrays first column have different start depths and end depths?

1 visualización (últimos 30 días)
Hi everyone. I have 189 different double arrays within a 1x189 cell. Each double array has depth in the first column and temperature in the second column. Each array is labeled ca{1,1}, ca{1,2} and so on. All the depth profiles decrease in the same increment of 0.25 meters however they start at different surface depths and end at different bottom depths.
For comparison analysis how i can create matching profiles that start at 1 meter for example and go down to to 50 meters with the pre-set 0.25 meter increment? Would the interp1 function be needed for this?
Many thanks in advance, Josh.

Respuestas (1)

Astarag Chattopadhyay
Astarag Chattopadhyay el 13 de Jun. de 2017
Hi Josh,
You can use interp1 function here to obtain similar number of data points. However, going by your example you have 200 data points between 1 meter and 50 meters, so make sure you have at least 200 rows in each array.
Secondly, if you are considering 1 meter as the starting depth and 50 meters as the end depth make sure no depth data starts after 1 meter or end before 50 meters.

Categorías

Más información sobre Environment and Clutter en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by