3d plot simple surf error

조회 수: 17 (최근 30일)
ionescu andrei
ionescu andrei 2017년 3월 15일
답변: Tohru Kikawada 2017년 3월 15일
x=1:0.1:10;
y=0.5:0.1:10;
k=1:0.1:10;
[xx yy kk]=meshgrid (x,y,k);
f=8.854187817.*(xx.*xx.*kk.^2)./(yy.*yy);
surf(xx,yy,f);
this doesn t work how to solve it? i really need help...

채택된 답변

Tohru Kikawada
Tohru Kikawada 2017년 3월 15일
You need to change
surf(xx,yy,f);
to
surf(xx(:,:,1),yy(:,:,1),f(:,:,1));
because surf can only creates a 3D surface plot. If you want to visualize more than 4D data, you need to use griddatan to fits a hypersurface in 3D.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by