Trilinear interpolation of data from measurements

4 ビュー (過去 30 日間)
Juliane Müller
Juliane Müller 2016 年 5 月 9 日
編集済み: Juliane Müller 2016 年 5 月 10 日
Hi all,
I have three arrays (x_position, y_position, z_position) which form the position in 3D and a corresponding array for the value at each position. All of them have a size of 68*1 values.
Now I want to do a trilinear interpolation between the value points at each position.
For this purpose I've found the promising matlab function interp3. But therefor I would need a matrix (68 * 68 * 68) for each position and the corresponding values. How can I generate them? For the position I've used the meshgrid function:
[xq,yq,zq] = meshgrid(x, y, z))
and
[X,Y,Z] = meshgrid(-34:1:33, -34:1:33, 1:1:68)
Now I have Matrices for the positions.
But how to generate a matrix for the value?
For this purpose I've used the scatteredInterpolant function. Is this the right way?
scatteredInter = scatteredInterpolant(x', z', y', stdX_C1', 'linear');
vq = scatteredInter(xq, zq, yq);
This creates a 68*68*68 matrix for vq. Afterwards I used slice to visualize the interpolation. But it looks not as expected! The interpolation isn't smooth at all. I want to have a smooth interpolation. It can be seen in the attached file "slice.fig". I've also attached my m-file for interpolating and the x, y, z and value(stdX_C1) array in "position_value.mat".
I'm really looking forward for any idea or solution. Thanks a lot! Juliane

回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by