too many outputs for ginput - documentation error?

21 ビュー (過去 30 日間)
Jim Hokanson
Jim Hokanson 2024 年 12 月 21 日 21:05
コメント済み: Jim Hokanson 2024 年 12 月 21 日 22:08
I would like to get only the x-coordinates for ginput. I was surprised to discover that ginput returns X and Y coordinates when only one output is requested. This doesn't seem to be documented behavior. Am I missing something?
XY = ginput(2);
[X,Y] = ginput(2);

採用された回答

Walter Roberson
Walter Roberson 2024 年 12 月 21 日 21:18
You are not missing anything. The behaviour of returning both X and Y together in one output is undocumented .
(It might perhaps have been documented long long ago; it is not documented now.)
  1 件のコメント
Jim Hokanson
Jim Hokanson 2024 年 12 月 21 日 22:08
Great. My brain has been a bit scrambled lately. Glad I wasn't missing something. Seems like something they could fix with the documentation going forward. Thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by