필터 지우기
필터 지우기

Interpolated 2D sections out of 3D plot

조회 수: 2 (최근 30일)
Ane Følgesvold Reines
Ane Følgesvold Reines 2019년 9월 27일
댓글: darova 2019년 9월 27일
I have a number of data for 3 variables - data points in 3D - which can be plotted using plot3(). I want to make 2D sections from this plot, keeping one of the 3 variables, lets call it z, constant at different values (set up an array of constant z values and make 2D sections in x-y plane for each value). I want to use interpolation to get the most accurate 2D section. Any help on how I can do this?
  댓글 수: 2
John Doe
John Doe 2019년 9월 27일
Do you have an example? And some data if possible please.
Ane Følgesvold Reines
Ane Følgesvold Reines 2019년 9월 27일
I cannot post the real data but lets say we have a data array of 3 columns and 100 rows (100 data points). I plot in 3D using
plot3(data(:,1),data(:,2),data(:,3))
Then I wanna make, lets say, ten different 2D plots in x-y-plane for z=[81:1:90].
How do I proceed for the interpolation of the data points?

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

채택된 답변

darova
darova 2019년 9월 27일
Use griddata() (use griddata(x,y,z,xq,yq,'method','cubic') if interpolation is needed) to build a surface
Use contour() to create a crossection at specific height
  댓글 수: 5
darova
darova 2019년 9월 27일
those are the levels plotted?
The answer is YES!
To extract contours: LINK
See HELP how data is stored ic ContourMatrix
contour_matrix_diagram.png
darova
darova 2019년 9월 27일
Please accept the answer if it helped

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

추가 답변 (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