To plot a graph of y = cuberoot of (x-1) in MATLAB, you can use the following code:
main.m189 chars13 lines
This code creates a range of x values from -10 to 10, applies the cuberoot function to each x value (subtracting 1 first) to calculate the corresponding y value, and then plots the resulting graph using the plot
function. The x and y axes are also labeled using the xlabel
and ylabel
functions, respectively.
When you run the code, you should see a graph of y = cuberoot of (x-1) with x ranging from -10 to 10.
gistlibby LogSnag