Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem on code running #2

Open
wenyangmao opened this issue Jul 15, 2024 · 4 comments
Open

Problem on code running #2

wenyangmao opened this issue Jul 15, 2024 · 4 comments

Comments

@wenyangmao
Copy link

wenyangmao commented Jul 15, 2024

Dear @yangqy916

When I run the code, I meet an error as the follow.

TextureCorrelation
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

How to resolve it? Thank you.

@yangqy916
Copy link
Collaborator

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.

@wenyangmao
Copy link
Author

@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

@yangqy916
Copy link
Collaborator

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.

@wenyangmao
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants