Why does putting a space after a function give a vector output?

1 次查看(过去 30 天)
I'm trying to pin down some behaviour I don't quite understand. In the following code:
floor 12
I expected this to return an error. However it returns
ans = 49 50
this seems to correspond in some way that 1 represents 49 and 2 represents 50. We can do a similar thing like
floor randomcharacters
or even with other inbuilt functions
abs 55.3
Does anyone know why exactly matlab returns these outputs?
Paul

采纳的回答

madhan ravi
madhan ravi 2020-9-24
  1 个评论
Paul Bowen
Paul Bowen 2020-9-24
Thanks madhan, that answers my question entirely! I couldn't find it before.
It isn't an assignment, it was a question a student asked in a lab and I had not come across this behaviour before. Thanks again!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by