Hi, I've been trying to do this question for a couple of days, but can't figure out how to use the meshgrid function to do 3 variables rather than two, and how to do the part involving plot3. This is the question:

5 views (last 30 days)
Use the rref() function to find the line of intersection between the two planes x + 3y − 2z = 3 , x − y + z = 2 . Use the meshgrid() and surf() commands to plot the two planes. Plot also the line of intersection. The plotting range should be x ∈ [0, 5], y ∈ [0, 5], z ∈ [−5, 10]. Using the command shading interp to remove grids from the surfaces, and use the command hold on to plot more than one item in one figure. That is, for properly defined x, y, z1, and z2, surf(x,y,z1); hold on surf(x,y,z2); shading interp plots the two surfaces defined by z1 and z2 in one figure. Then plot3(xt,yt,zt,’r’,’linewidth’,3) can be used to plot a red line of width (thickness) 3. Label your axes. Try rotating the figure for different views in order to verify that the line does indeed lie on the intersection of the two planes. Submit: write the parametric equation of the line of intersection, along with a printout of your plot of the two planes along with the line of intersection (all in one figure). Specifications of this figure are given above

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!