matlab - The function sqrt() without parentheses returns weird value -


i've accidentally typed following in octave:

sqrt 25 

and got back:

ans =     7.0711   7.2801 

with parentheses, sqrt(25) returns correct result. happening without parentheses? matlab share same behaviour or specific octave? don't have matlab cannot check.

octave interpreting length-2 char array, , converting these ascii representation (50 , 53), getting square root. can done in matlab using:

 sqrt(double('25')) 

matlab produces error sqrt isn't defined char inputs when used without parentheses.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -