필터 지우기
필터 지우기

Contour map from X,Y,Z Columns

조회 수: 1 (최근 30일)
premraj
premraj 2011년 8월 16일
Hi , I want to create a contour map with circular shape(radius 150) from three columns of data .Please help me to solve this issue.
X Y Z
---------------------------
0 0 8687
45 45 7951
45 -45 9161
-45 -45 8357
-45 45 7969
0 -70 8748
70 0 8522
0 70 8246
-70 0 8588
Thanks in advance!!!

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 8월 16일
You need to re-organize your data. Maybe like this:
data=[...
0 0 8687
70 0 8522
45 45 7951
0 70 8246
-45 45 7969
-70 0 8588
-45 -45 8357
0 -70 8748
45 -45 9161
70 0 8522];
x=data(:,1);
y=data(:,2);
z=data(:,3);
stem3(x,y,z);hold on;
plot3(x,y,z)
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2011년 8월 17일
That is right. Your data is not fit for the contour() function. You can take a look at some examples of contour() usage to figure out what is the required data. You have so little data. I could only guess what you are expecting. The figure generated above is the only meaningful visualization with the amount data you have.
Walter Roberson
Walter Roberson 2011년 8월 17일
premraj, you would need to use griddata() or something similar in order to produce an array that could be used for contour()

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

추가 답변 (0개)

카테고리

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