47box
Newbie level 5
Hi,
I´ve been trying to plot a rational function to see the graph of it.
f(x) = (2x4-x2+1) / x2-4
From a book I´m following a graph is showed below :
figure1
I created a script trying make a graph comes out.
I got a graph completely out of what we have in a image above from the book.
As we can see it pass the limits of -2 and 2.
How can I plot a graph and have the same as we have in the book (figure 1)?
I tried to see matlab materials and could not figure out how to do that.
Thanks in advance
I´ve been trying to plot a rational function to see the graph of it.
f(x) = (2x4-x2+1) / x2-4
From a book I´m following a graph is showed below :
figure1
I created a script trying make a graph comes out.
Code:
clear
clc
x =(-100:0.01:100);
y = ((2.*(x.^4))-(x.^2)+1)./(x.^2)-4;
plot(x,y),hold on
axis([-4 4 -50 50])
grid on
I got a graph completely out of what we have in a image above from the book.
As we can see it pass the limits of -2 and 2.
How can I plot a graph and have the same as we have in the book (figure 1)?
I tried to see matlab materials and could not figure out how to do that.
Thanks in advance