フィルターのクリア

waitfor function not working properly.. need help

5 ビュー (過去 30 日間)
jchris14
jchris14 2016 年 8 月 16 日
コメント済み: Walter Roberson 2016 年 8 月 17 日
Hi guys,
I used the waitfor function on matlab 2013b and now that i have installed 2015b, this function does not seem to work properly.
Firstplot= plot(thld,numBlackPixels); %plots each thld value and its corresponding black pixel count
grid on
xlabel('threshold')
ylabel('BlackPixels')
zoom on;
waitfor(gcf,'CurrentCharacter',13)
zoom reset
zoom off
[x,y]=ginput; %lets users select the range of values for thresholding
x1=x(1); %first x value chosen
x2=x(2); %second x value chosen
The above line of codes is what i've been using in 2013b and it doesn't work in 2015b.. i get the error
Error using waitfor
Invalid property.
Error in Image_Analysis_For_Porosity_And_Cracks (line 27)
waitfor(gcf,'CurrentFigure',13)
I cant figure it out. Thanks for the help

採用された回答

Walter Roberson
Walter Roberson 2016 年 8 月 16 日
waitfor(gcf,'CurrentCharacter', char(13))
  2 件のコメント
jchris14
jchris14 2016 年 8 月 16 日
thank you. That was a silly question but thank you
Walter Roberson
Walter Roberson 2016 年 8 月 17 日
It was not a silly question. I just happened to test on R2016a that had a much clearer error message for this case.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by