How to plot a variable against two other dependent variables
이전 댓글 표시
Suppose I have a variable z = f(x,y). How can I generate a 2D plot with z along the vertical axis with x along the bottom horizontal axis and y along the top horizontal axis? Or I could have two bottom axis, one for x and one for y.
댓글 수: 1
Azzi Abdelmalek
2012년 9월 14일
I don't think it's possible, a 2D plot require only 2 values
답변 (1개)
Sean de Wolski
2012년 9월 14일
[xx yy] = meshgrid(x,y);
Z = f(xx,yy);
mesh(xx,yy,Z)
or
surf(xx,yy,Z);
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!