How to find the contigous coordinate points between two varaibles datasets and do regression
1 次查看(过去 30 天)
显示 更早的评论
Folks
I have two data variable sets of different sizes, A (chlorophyll) is 4317x3 matrix of lat, lon, and con. data value and B(SST) is 5851x3 matrix, of same lat, lon, and conc. data value. I want to find the coordinates in A data set that are closest to those B.
Then based on the index locations of those coordinates in the B matrix, extract out the concentration values from that correspond to those coordinates so that I can plot A and B concentration data sets value against one another.
The difficult part is to sort the coordinate locations in the A matrix with those in the B matrix, I would like to find the closest possible coordinate locations between the 2 large marice data sets.
please find the attached link for 2 datsets files
I have used this code
F = scatteredInterpolant(B(:,1), B(:,2), (1:size(B,1)).', 'nearest');
A_is_nearest_idx = F( A(:,1:2) )
B_closest_to_A = B(A_is_nearest_idx, :)
I find error
kindly help to sort the variables which was of continuous in order for synchronize and interpolate.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!