How to Extract X,Y,Z vectors from grid data?

3 ビュー (過去 30 日間)
Ayham Aljawabrah
Ayham Aljawabrah 2023 年 1 月 21 日
回答済み: Sulaymon Eshkabilov 2023 年 1 月 21 日
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
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
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
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)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by