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

4 visualizzazioni (ultimi 30 giorni)
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 Commenti
Star Strider
Star Strider il 21 Gen 2023
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 il 21 Gen 2023
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?

Accedi per commentare.

Risposte (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov il 21 Gen 2023
If you data as given n-by-5, then you can just use surf(z), e.g.:
data = rand(5,50);
surf(data)

Categorie

Scopri di più su Contour Plots in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by