Re: [Scilab-users] Can't understand different answer's on sqrt(x^2+1)

2013-05-26 Thread Modestas Bunokas
Thank you for your answers, seems need more practice with scilab as doing mistakes like small kid. -- View this message in context: http://mailinglists.scilab.org/Can-t-understand-different-answer-s-on-sqrt-x-2-1-tp4026728p4026731.html Sent from the Scilab users - Mailing Lists Archives mai

Re: [Scilab-users] Can't understand different answer's on sqrt(x^2+1)

2013-05-26 Thread Arvid Rosén
Hi. Scilab will interpret -10^2 as -(10^2), but m^2 with m=-10 will evaluate as (-10)^2. Cheers, Arvid 26 maj 2013 kl. 22:12 skrev Modestas Bunokas : > Trying to work with vectors, and getting weird results. Example: > > m=[9 16]; > sqrt(m^2+1) > ans = 9.055385116.03122 > > I will get s

Re: [Scilab-users] Can't understand different answer's on sqrt(x^2+1)

2013-05-26 Thread Adrien Vogt-Schilb
On 26/05/2013 22:12, Modestas Bunokas wrote: Trying to work with vectors, and getting weird results. Example: m=[9 16]; sqrt(m^2+1) ans = 9.055385116.03122 I will get same values if I will use input as vector, or will put values manually. But if I use negative numbers like: m=[-10 -3]; sqr

[Scilab-users] Can't understand different answer's on sqrt(x^2+1)

2013-05-26 Thread Modestas Bunokas
Trying to work with vectors, and getting weird results. Example: m=[9 16]; sqrt(m^2+1) ans = 9.055385116.03122 I will get same values if I will use input as vector, or will put values manually. But if I use negative numbers like: m=[-10 -3]; sqrt(m^2+1) ans =10.0498763.1622777 -