Extract specific X & Y data from Contour curve
이전 댓글 표시
Hello MATLAB experts,
I have this below contour plot. How can I get the X and Y coordinate data for the specific contour line 1. Either in an array or table format would do the job.

Thanks for looking at it. I have attached the script for the reference.
채택된 답변
추가 답변 (1개)
Matt J
2022년 8월 25일
1 개 추천
This has worked pretty well for me,
댓글 수: 5
Chinmayraj Doddarajappa
2022년 8월 25일
Worked fine for me:
>> M=contourf(N,f,SpecificLift,[1 2 4 6 8 10 12 14 16 18 20],'ShowText','on');
>> contourTable = getContourLineCoordinates(M);
>> contourTable=contourTable(contourTable.Level==1,:)
contourTable =
113×4 table
Level Group X Y
_____ _____ ______ ______
1 1 6 32
1 1 5.9722 32.216
1 1 5.9324 32.517
1 1 5.8649 33.048
1 1 5.7973 33.608
1 1 5.7297 34.199
1 1 5.7187 34.297
1 1 5.6622 34.792
1 1 5.5946 35.413
: : : :
1 1 2.5541 141.32
1 1 2.5427 142.51
1 1 2.5234 144.59
1 1 2.5049 146.68
1 1 2.4872 148.76
1 1 2.4865 148.84
1 1 2.4689 150.84
1 1 2.4514 152.92
1 1 2.4345 155
Display all 113 rows.
Chinmayraj Doddarajappa
2022년 8월 25일
Matt J
2022년 8월 25일
Yes, that was what the link was for - the link you said you already downloaded from and tried.
Chinmayraj Doddarajappa
2022년 8월 25일
카테고리
도움말 센터 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


