Contourf plot of datasets

3 visualizzazioni (ultimi 30 giorni)
Parham Ebrahimi
Parham Ebrahimi il 15 Ago 2019
Commentato: Star Strider il 16 Ago 2019
Does anyone know how can I have a 2D-contour plot of some given data points?
I have the coordinates inside two vectors x and y. The problem is there is no analyctical function relating the height z, to the coordinates.
I have a seperate vector which has the values of z corrospondig to each (x,y) pair.
I would appreciate if you could help me with this.
Thanks in advance!

Risposta accettata

Star Strider
Star Strider il 15 Ago 2019
You might find the griddata function useful. It takes random (x,y) values and interpolates gridded z-matrices from them that contour and contourf can use.
  4 Commenti
Parham Ebrahimi
Parham Ebrahimi il 16 Ago 2019
You were right. I tried with reshape and it worked. Now I will interpolate to generate more data in the contour.
Thanks!
Star Strider
Star Strider il 16 Ago 2019
As always, my pleasure!

Accedi per commentare.

Più risposte (0)

Categorie

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

Community Treasure Hunt

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

Start Hunting!

Translated by