how to INTERPOLATE starting from three circles
2 ビュー (過去 30 日間)
Through the information of 3 distances and 3 wind speeds I was able to create circles as shown in the figure where each point that makes up the circles is characterized by X=latitude, Y=longitude of the point and Z is the probability of obtaining the speed of a given wind at that distance from the center.
Now what I would like to do is create the same graph but INTERPOLATING on the entire grid: in each point of the grid starting from values of X=3 known distances and Y= 3 known speeds and entering a distance from the point of interest (xi), I would like calculate the angle at that point with respect to the source (as I did for the three circles), then with this distance from the source I thought I would enter the graph by interpolating and see what is the speed it takes to get to that point at that distance.
I had read about the function yi = interp1q (X, Y, xi): for example I thought that to calculate the probability of the speed, I know how far I am (like 100km), I use interp1q, I calculate what minimum speed (yi) I need to reach the distance (100km) and consequently calculate the probability of having a speed higher than the minimum speed I found.
I tried to use this function but it fails. Can anyone help me?
Image Analyst 2021 年 8 月 21 日
See how they use sin and cos in the third example in the FAQ:
Basically put that code into a double loop over your Xs and Ys. Here's a start:
angles = linspace(0, 360, 1000);
for k = 1 : length(X)
xCenter = X(k);
for k2 = 1 : length(Y)
yCenter = Y(k2);
xCircle = xCenter + radius * cosd(angles)
yCircle = yCenter + radius * sind(angles)
plot(xCircle, yCircle, '-', 'LineWidth', 3);
Write back if you still can't figure it out.