Error while evaluating UIControl Callback..

Error in Glaucoma_Detection>mask_Callback (line 785) get(handles.Xmin)=Xmin;
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in Glaucoma_Detection (line 42) gui_mainfcn(gui_State, varargin{:});

7 件のコメント

khushboo chhikara
khushboo chhikara 2018 年 4 月 20 日
Dennis
Dennis 2018 年 4 月 20 日

You create 2 vectors x,y with the length of rows/cloumns of your image, then you try to index Rimage(x+1,y+1) (which has the size of your image) in several cases. Thats why you get the Index exceeds matrix dimension error.

The second error is more of a synthax error, try

Xmin=get(handles.Xmin);
Xmax=get(handles.Xmax);
khushboo chhikara
khushboo chhikara 2018 年 4 月 20 日

still getting the same errors

Dennis
Dennis 2018 年 4 月 20 日
What did you do to resolve your first problem?
khushboo chhikara
khushboo chhikara 2018 年 4 月 20 日
Nothing !! The errors are still same .. i have tried changing my image too !!
Jan
Jan 2018 年 4 月 20 日
Please post the relevant part of the code only. The nature of the forum is a discussion in public. Therefore sharing the information by private emails is rarely useful.
Walter Roberson
Walter Roberson 2018 年 4 月 21 日
Please do not close Questions which have an Answer

サインインしてコメントする。

 採用された回答

Jan
Jan 2018 年 4 月 20 日

0 投票

I cannot find out, which is the line 1132. It is not useful to post such a huge code (without a proper formatting! Please read How to format code) and let the readers count lines to find the failing code.

I guess the problem is caused by something like this:

[rows columns] = size(Image);
Rimage = Image;
for y = 1:columns
  for x = 1:rows
    if (Rimage(x, y+1)==th1) 

Now you try to process Rimage(x, y+1), when y=columns. Such an element does not exist, because Rimage does not have columns+1 columns.

You can use the debugger to check this. Type in the command window:

dbstop if error

Then run the code again until Matlab stops at the problem. Now check the values and sizes of the variables used in this line.

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 4 月 21 日

0 投票

User posted the complete source in a different question. I cleaned it up and fixed some of the bugs and posted source at https://www.mathworks.com/matlabcentral/answers/396346-error-while-evaluationg-uicontrolm-callback#comment_559155

カテゴリ

ヘルプ センター および File ExchangeData Import and Analysis についてさらに検索

質問済み:

2018 年 4 月 20 日

回答済み:

2018 年 4 月 21 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by