Difference in TriSurf and Surf - Adding Two trisurf plot on one graph.

조회 수: 9(최근 30일)
I uses this to get a surface plot between three variables. My data was in one column.
But when I use Surf(x,y,z) it gives error "??? Undefined function or variable 'X'."
Also I have 10 sets of data how can I plot more than one surface on one graph in a different color.


Walter Roberson
Walter Roberson 2012년 12월 9일
Note that MATLAB is case-sensitive, so if you defined a variable "x" then "X" is a different variable. Also, Surf() would be different than surf()
Please show your exact code.
To plot multiple surfaces, use "hold on" after the first plot. You can pass color information to surf()
  댓글 수: 3
Walter Roberson
Walter Roberson 2012년 12월 18일
contour() requires grids of data too. You need exactly the same preparation work for contour() that you need for surf()

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by