Contour plot from data stored in four different array!

조회 수: 10 (최근 30일)
Subhradeep Pal
Subhradeep Pal 2017년 8월 5일
댓글: KSSV 2017년 8월 5일
How I can plot a contour/surface plot with data stored in four different arrays say x,y,z and n? Each array has same dimmension say 486 x 1. I have tried meshgrid and surf command in vain. Thanks in advance!

답변 (1개)

KSSV
KSSV 2017년 8월 5일
x0=min(x);x1=max(x);
y0=min(y);y1=max(y);
N=100 ;
x=linspace(x0,x1,N);
y=linspace(y0,y1,N);
[X,Y]=meshgrid(x,y);
Z=griddata(x,y,z,X,Y);
surf(X,Y,Z)
  댓글 수: 2
Subhradeep Pal
Subhradeep Pal 2017년 8월 5일
Dear KSSV, Thanks for the help. I understood some of the codes and yes I had not tried griddata command earlier. However I want the plot in the form of the following image:
The data for x, y and z are stored in different arrays. Any help regarding this is highly appreciated. Actually I am taking the data from a TCAD simulator.
KSSV
KSSV 2017년 8월 5일
Attach your data....

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

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by