I would like to have a 2D plot along with a 3D surface or mesh plot - shown by the blue line I drew on the surface plot below. How do I get it?
UPDATE: Natan's Solution worked :-) But I now have a new Problem - How do I add 2 Y axis to my MATLAB Plot?
Just add to the surf plot another plot using plot3
where the relevant axis has the limits of the surf plot.
For example:
z=peaks(100);
surface(z, 'EdgeColor', 'none');
colormap(hot)
view(30,30); camlight; axis vis3d
x1=linspace(0,100);
hold on
plot3(x1,0*ones(1,numel(x1)),4*sin(x1))