フィルターのクリア

empty entry using ginput !!

1 回表示 (過去 30 日間)
Ano
Ano 2016 年 11 月 23 日
コメント済み: Image Analyst 2016 年 11 月 23 日
Hello! I am using the function ginput in order to get the coordinates from a figure but I get x and y as a 0x0 double, any possible reason for this, the code I am using to do so is really very basic!
while ~isempty(t)
[x,y]=ginput(1);
end

採用された回答

Adam
Adam 2016 年 11 月 23 日
編集済み: Adam 2016 年 11 月 23 日
[x,y]=ginput(1);
works fine for me, but I don't know what you are trying to do in the while loop. t never changes so either it is empty at the start and x, y never get set or it isn't empty at the start and your loop is infinite.
  1 件のコメント
Image Analyst
Image Analyst 2016 年 11 月 23 日
You accepted this, but how does this explain why your x and y were empty? Adam said it worked fine for him and didn't produce empty x and y.

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2016 年 11 月 23 日
Are you sure you're not just hitting enter before left-clicking, or maybe you're right clicking instead? For me, when I left click, x and y definitely have values.

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by