too many outputs for ginput - documentation error?

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);

 采纳的回答

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 个评论

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 个)

类别

帮助中心File Exchange 中查找有关 Data Exploration 的更多信息

产品

版本

R2023b

标签

Community Treasure Hunt

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

Start Hunting!

Translated by