How to Extract X,Y,Z vectors from grid data?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have the below data from contour grid, but I am not sure how to deal with it, the data are more than 3000 rows. I have two questions regarding this data:
1- How can I generate a contour plot from them?
2- How can I extract the X,Y,Z vectors for the data points sets from these data?
100 141 23.53579 33.28464
1.90671627E-03 1.94953856E-03 2.08172624E-03 2.31407308E-03 2.66342701E-03
3.15125294E-03 3.80188984E-03 4.64025445E-03 5.68824462E-03 6.95894936E-03
8.44838407E-03 1.01259534E-02 1.19266327E-02 1.37488209E-02 1.54609569E-02
1.69172529E-02 1.79795640E-02 1.85401754E-02 1.85401754E-02 1.79795640E-02
1.69172529E-02 1.54609569E-02 1.37488209E-02 1.19266327E-02 1.01259534E-02
8.44838407E-03 6.95894936E-03 5.68824462E-03 4.64025445E-03 3.80188984E-03
3.15125294E-03 2.66342701E-03 2.31407308E-03 2.08172624E-03 1.94953856E-03
1.90671627E-03 1.94953856E-03 2.08172624E-03 2.31407308E-03 2.66342701E-03
3.15125294E-03 3.80188984E-03 4.64025445E-03 5.68824462E-03 6.95894936E-03
8.44838407E-03 1.01259534E-02 1.19266327E-02 1.37488209E-02 1.54609569E-02
1.69172529E-02 1.79795640E-02 1.85401754E-02 1.85401754E-02 1.79795640E-02
....
(dpb formatted data as code...)
댓글 수: 3
Star Strider
2023년 1월 21일
If that matrix is the result of a calculation on the ‘X’, ‘Y’, and‘Z’ vectors, it likely cannot be done.
Doing that would be the mathematical equivalent of un-frying an egg.
Adam Danz
2023년 1월 21일
Is the matrix of data you shared the input to contour(z)?
Is your question how to extract the (x,y,z) coordinates of lines produced by a contour plot with the input matrix you shared?
답변 (1개)
Sulaymon Eshkabilov
2023년 1월 21일
If you data as given n-by-5, then you can just use surf(z), e.g.:
data = rand(5,50);
surf(data)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!