(xy^3)/(1+y^2) = 8/5 ezplot in matlab

To plot the equation (xy^3)/(1+y^2) = 8/5 in Matlab, we first need to rearrange the equation into the form y = f(x). We can do this by isolating y on one side of the equation:

main.m
(xy^3)/(1+y^2) = 8/5
xy^3 = (8/5) * (1+y^2)
xy^3 = 8/5 + 8/5 * y^2
y^2 = (5/8) * (xy^3 - 1)
y = sqrt((5/8) * (xy^3 - 1))
121 chars
6 lines

Now that we have the equation in the required form, we can use the ezplot function in Matlab to plot the curve. Here's the Matlab code:

main.m
% Define the equation
eqn = @(x, y) (x * y.^3) ./ (1 + y.^2) - 8/5;

% Plot the curve
ezplot(eqn, [-5, 5, -5, 5]);
115 chars
6 lines

The first line defines the equation as an anonymous function that takes in x and y as inputs. The second line plots the curve using the ezplot function, which takes in the equation and the x and y ranges to plot.

This will produce a plot of the curve in the range of -5 to 5 on both x and y axes.

gistlibby LogSnag