Interpolation by pressure using interp1
Show older comments
Hello all,
I have a table with 3 variables: sampling station, pressure (decibar) and temperature. For each of my 46 stations, I have the temperature by pressure. Like so:
Station Pressure Temperature
B 0.25 1.2
B 0.33 1.21
B 0.77 1.22
...
C 0.12 ...
Now, I simply want to interpolate the data (pressure and temperature) per 1 decibar for each station so I have the following result:
Station Pressure Temperature
B 1 1.5
B 2 1.54
B 3 1.59
...
C 1 ...
Is there an easy way to do this using interp1?
2 Comments
KSSV
on 2 Feb 2017
You may read this documentation: https://in.mathworks.com/help/matlab/ref/interp1.html. We comment on your data if we have data in hand.
Jan
on 2 Feb 2017
The relation between "B 0.25 1.2" and "B 1 1.5" is not clear. Please post an example for the real data in valid Matlab syntax. Currently the data look like a text file. But for suggestion a solution, using variables would be more useful.
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!