countour plot based on temperature value

조회 수: 2 (최근 30일)
Bugce Gokce
Bugce Gokce 2020년 6월 9일
댓글: Fego Etese 2020년 6월 9일
I have x, y values. and I have a temperature for each point. I want to draw a counter line based on these temperature values. how can I do it?
contour (xq, yq, vq); %size of matrix:xq (247x1) yq (247x1) vq (247x1)
When I use it, I get the following error.
Error using contour (line 48)
Z must be at least a 2x2 matrix.

채택된 답변

Adam Danz
Adam Danz 2020년 6월 9일
편집: Adam Danz 2020년 6월 9일
This example in the documentation shows how to set up the contour() inputs.
For the syntax contour(x,y,z), z is your mxn temperature matrix. x is your 1xn (or nx1) latitude values, y is your 1xm (or mx1) longitude values. Note now the n's and m's pair between those inputs.
Alternatively, x and y can also be mxn matrices with the lat and lon values for each value of z.
Here's a demo to show the shape of inputs.
contour(1:10, 1:20, rand(20,10))
axis equal
  댓글 수: 1
Fego Etese
Fego Etese 2020년 6월 9일
Hello Adam Danz, please i really need your help on this question, i can't seem to wrap my head around it.
I will really appreciate your help,
Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (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