How to remove this error? The grid vectors must contain unique points.
Show older comments
Hi I am using this code...
TVD = TVD(2083:10150);
TWT = TWT(2083:10150);
IntVP = IntVP(2083:10150);
IntVS = IntVS(2083:10150);
RhoG = RhoG(2083:10150);
regtime = TWT(1):2:TWT(end); % Regularization of time (TWT) in sec.
% Interpolation of VP, VS, Rho with respect to regtime.
regvp = interp1(TWT, IntVP, regtime, 'linear', 'extrap');
regvs = interp1(TWT, IntVS, regtime, 'linear', 'extrap');
regrhoG = interp1(TWT, RhoG, regtime, 'linear', 'extrap');
regTVD = interp1(TWT, TVD, regtime, 'linear', 'extrap');
regtime=regtime/1000; % time in seconds
and facing this error. How can I fix it.
Answers (1)
Jan
on 27 Feb 2021
0 votes
The error message tells you, that TWT does not contain unique values. It is impossible to gues, how you want to solve this problem, because this depends on the nature of your data.
1 Comment
Nisar Ahmed
on 3 Mar 2021
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!