help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with specific math function (x^2-1)/(x^2+1)


From: koleygr
Subject: Problem with specific math function (x^2-1)/(x^2+1)
Date: Mon, 22 May 2017 10:45:51 -0700 (PDT)

Hi, I am trying to plot the above function.

My code is:

x=0:0.05:5;
f=@(x) (x.*x-1)/(x.*x+1);
y=f(x)
%Here it prints just one value of y and that's the problem!!!
plot(x,y,'r')

The next is the same but with simpler function and it works
f=@(x) x.*x;
y=f(x)
%Here it works fine!!!
plot(x,y,'r')

So, I think it is a bug or something
(version=3.8.2 on debian)



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Problem-with-specific-math-function-x-2-1-x-2-1-tp4683426.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]