Problem to get the right format of a Surf Plot
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to plot a surface. What I need is the surface that is on top, but I keep getting the two surfaces underneath. Is there any reason why this is happening?
BB = [TBfunc1;TBfunc2]
X = [BB(:,1)]
Y = [BB(:,3)]
Z = [BB(:,2)]
[xi, yi] = meshgrid(X,Y);
F = scatteredInterpolant(X,Y,Z)
zi = F(xi,yi)
surf(xi,yi,zi, 'EdgeAlpha', 0)
댓글 수: 0
채택된 답변
Star Strider
2021년 2월 26일
It looks as though ‘X’ is not sorted. Without the data a guess would be this possible solution:
BB = sortrows (BB,1);
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!