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

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일

0 개 추천

댓글 수: 1

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

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

2020년 9월 24일

댓글:

2020년 9월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by