Contourf plot of datasets

1 次查看(过去 30 天)
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!

采纳的回答

Star Strider
Star Strider 2019-8-15
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 个评论
Parham Ebrahimi
Parham Ebrahimi 2019-8-16
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 2019-8-16
As always, my pleasure!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Contour Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by