To create a plot of x^-1
in MATLAB, you can follow these steps:
x
values over which you want to plot the function.y
values using the expression y = x.^-1
.plot
function to create the plot.Here's an example code snippet to accomplish this:
main.m247 chars8 lines
This will generate a plot of y = x^-1
with x
values ranging from 1 to 10, with an increment of 0.1. You can adjust the range and increment based on your specific needs.
gistlibby LogSnag