Filter löschen
Filter löschen

Padded input for ScatteredInterpolant

1 Ansicht (letzte 30 Tage)
Yi-xiao Liu
Yi-xiao Liu am 2 Mär. 2021
Bearbeitet: Yi-xiao Liu am 3 Mär. 2021
I am tring to reconstruct a surface in cylinderical coordinate space from set of points. theta,R,z represents azimuthal, radial, axial coordinates, respectively, of measured points. And 0<=theta<360, 0<=z<=200.
Paddedtheta=[theta-360;theta;theta+360];
PaddedR=[R;R;R];
Paddedz=[z;z;z];
RInterpolant=scatteredInterpolant(Paddedtheta,Paddedz,PaddedR,'linear');
However, inquiry RInterpolant at theta=0 and theta=360 does not return identical results:
RInterpolant(repmat(0,[1,201]),0:200)-RInterpolant(repmat(360,[1,201]),0:200)
ans =
1.0e-14 *
Columns 1 through 12
0 0 -0.0888 0 0 0 0 0 0 0 0 0
Columns 13 through 24
0 0 -0.0888 0 0 0 0 0 0 0 0 0
Columns 25 through 36
0 0 0 0 0 0 0 0 0.0888 0 0 0
Columns 37 through 48
0 0 0 0 0 0 0 0 0 0 0 0
Columns 49 through 60
0 0 0 0 0 0.0888 0 0 0 0 0 0
Columns 61 through 72
0 0 0 0 0 0 0 0 0 0 0 0
Columns 73 through 84
0 0 0 0 0 0 0 0 0 0 -0.0888 0
Columns 85 through 96
0 0 0 0 0.0888 0 0 0 0 0 0 0
Columns 97 through 108
0 0 0 0 0 0 0 0 0 0 0 0
Columns 109 through 120
0 0 0.0888 0 0 0 0 0 0 0 -0.0888 0
Columns 121 through 132
0 0 0 0 0 0 0 0 0 0 0 0
Columns 133 through 144
0 0 0 0 0 0 0 0 0 0 0 0
Columns 145 through 156
0 0 0 0 0 0 0 0 0 0 0 0
Columns 157 through 168
0 0 0 0.1776 0 0 0 0 -0.0888 0 0 0
Columns 169 through 180
0 0 0 0 0 0 0 0 0 0 0 0
Columns 181 through 192
0 0 0 0 0 0 0 0 0 0 0 0
Columns 193 through 201
0 0 0 0 0 0 0 0 0
Could anyone tell me why?
  2 Kommentare
darova
darova am 3 Mär. 2021
THe error is very small
ans =
1.0e-14 *
Columns 1 through 12
Yi-xiao Liu
Yi-xiao Liu am 3 Mär. 2021
I understand the error is small. I am just curious the cause as I was not expecting any

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by