Open wenyangmao opened 3 months ago
The occurrence of this issue indicates that by changing the slope value within a discrete numerical interval, four values with the smallest absolute correlation were found. Generally, there is only one minimum value, and in slightly special cases, there might be two minimum values.
In your case (i.e., more than two minimum values): First, you need to output all the k values to check for any anomalies (such as all being 0 or Inf). If the k values are all normal numbers, you need to modify the step parameter in the sixth line of slope_estimation, setting it to a smaller value.
Since your situation is beyond what I can anticipate, if you can provide the values of na and nr, as well as the k vector values when slope_estimation throws an error, or provide your data contain the portion of the error occurs , I can further diagnose the issue.
@yangqy916 Thank you for the reply. But when I change the step parameter in the sixth line of slope_estimation, it still does not work. Now I upload the file for diagnosing. 链接:https://pan.baidu.com/s/14bsV0nu302lwspr3M14N-w?pwd=xgmr 提取码:xgmr
I tested your data, and the program ran without any bugs. I infer that you did not set the N_ref parameter according to the actual data. In your case, N_ref should be 11.
Additionally, please note that for your data, the window size parameter W should also be set larger, such as 251.
If the problem persists, feel free to continue communicating with me. If the program runs without bugs, please refer to the article to adjust the parameters that control the algorithm's performance.
@yangqy916 Thank you for the reply.
But when I change the following parameters: N = 61; % Number of time series SAR images N_ref = 11;
W = 251;
the error still occurred.
Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-4.
Error in slope_estimation (line 122) Results_Compare(3,n) = k(index);
Error in TextureCorrelation (line 93) [~,~,k_HTC] = slope_estimation(phase_ts_deramp,dem,MASK,W,r,N_ref); % **6
My matlab version is R2020a. I do not know what happen now.
Dear @yangqy916
When I run the code, I meet an error as the follow.
Error in slope_estimation (line 122) Results_Compare(3,n) = k(index);
Error in TextureCorrelation (line 93) [~,~,k_HTC] = slope_estimation(phase_ts_deramp,dem,MASK,W,r,N_ref); % **6
How to resolve it? Thank you.