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

1 vue (au cours des 30 derniers jours)
Paul Bowen
Paul Bowen le 24 Sep 2020
Commenté : Paul Bowen le 24 Sep 2020
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

Réponse acceptée

madhan ravi
madhan ravi le 24 Sep 2020
  1 commentaire
Paul Bowen
Paul Bowen le 24 Sep 2020
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!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by