MATLAB: Plot along line y = x

2dalong lineplotxyy=x

I have a function of 2 variables, x and y, and have been asked to plot it in 2D along the line y = x. I've checked the documentation for the plot command but couldn't find any relevant information.

Best Answer

t = linspace(-3, 17, 500); %arbitrary bounds and number of points
plot3(t, t, f(t, t));
Related Question