How to create a function with vectors and vertical asymptote using MATLAB

Posted by Pedro J Trinidad on Stack Overflow See other posts from Stack Overflow or by Pedro J Trinidad
Published on 2010-04-27T15:49:19Z Indexed on 2010/04/27 15:53 UTC
Read the original article Hit count: 319

Filed under:
|
|

Plot the function f(x) = 1.5x / x-4 for -10 equal or less than X equal or less than 10. Notice that the function have a vertical asymptote at x = 4. Plot the function by creating two vectors for the domain of x. The first vector (call it x1) with elements from -10 to 3.7, and the second vector (calle it x2) with elements from 4.3 to 10. For each of the X vector create a Y vector (call them y1 and y2) with the corresponding values of Y according to the function. To plot the function make two curves in the same plot (y1 vs. x1 and y2 vs. x2).

© Stack Overflow or respective owner

Related posts about matlab

Related posts about function