Get values of the particular line from surf plot
조회 수: 3 (최근 30일)
이전 댓글 표시
I'm intersted to get all the values of the line 2- curve - marked in figure
load('jj.mat');
A1 = jj;
figure
A1(A1>0.05) = NaN;
surf(A1);shading interp;view(2);
figure
contour(A1); shading interp; view(2)
figure
v = [0.045 0.055];
contour3(A1,v); shading interp; view(2)
How Shall I get only this lower curve in a separate figure and then get all the Y values ?
댓글 수: 0
채택된 답변
Konrad
2021년 9월 3일
Hi Ramesh,
the contour3() function returns the contour matrix (see help) containing x- and y-coordinates of the contour. You can use these to extract the desired part of the contour:
figure
v = [0.045 0.055];
contMat = contour3(A1,v); shading interp; view(2)
idx = contMat(1,:)>60 & contMat(2,:) < 850;
contSubset = contMat(:,idx);
Now contSubset contains x coordinates of the marked part in the first row and y coordinates in the second row.
Best, Konrad
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 3-D Volumetric Image Processing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!