use fimplicit to plot the curve defined by the equation 3y+y^3-x^3=5 in matlab

To use fimplicit to plot the curve defined by the equation 3y + y^3 - x^3 = 5, follow the steps below:

  1. Define a function that represents the equation:
main.m
equation = @(x,y) 3*y + y.^3 - x.^3 - 5;
41 chars
2 lines
  1. Use fimplicit to plot the curve:
main.m
fimplicit(equation, [-10, 10, -10, 10]);
41 chars
2 lines

The second argument [-10, 10, -10, 10] specifies the range of x and y values for the plot.

The complete code snippet would look like this:

main.m
equation = @(x,y) 3*y + y.^3 - x.^3 - 5;
fimplicit(equation, [-10, 10, -10, 10]);
82 chars
3 lines

This will plot the curve defined by the equation 3y + y^3 - x^3 = 5 in a figure window.

Tags: matlab, fimplicit, plotting, equation

related categories

gistlibby LogSnag