Heatmap plot using the XYZ values

조회 수: 26 (최근 30일)
Rahul Gulia
Rahul Gulia 2022년 9월 21일
댓글: Rahul Gulia 2022년 9월 26일
I have a Dataset of size 575718x3.
First column contains the x-location, second column contains the y-location, and the 3rd column contains the signal strength that a given x,y-location.
I tried using the heatmap() function and the satter function. But they give me an error for duplicate values.
My dataset is huge, and it looks something like this,
x y SINR
1 1.0 23
1 1.1 25
1 1.2 27
2 2.0 25
2 2.1 29
2 2.2 30
i.e., each x-location has a huge granularity on its simultaneous y=position.
Kindly suggest if I can generate a heatmap from this matrix.
My Solution: I have transformed this matrix to size 4758 x 121, with each point showing the SINR strength. i.e., 4758*121=575718.
And the imagesc() function ca give me the required heatmap, that looks like this. But this is a complex process.
I would really appreciate it if someone can guide me to get this kind of heatmap from the XYZ value matrix described above.
  댓글 수: 7
J. Alex Lee
J. Alex Lee 2022년 9월 26일
Oh I see...it's more of the "CData" syntax...well just to be clear, in the above examples
heatmap(tbl,"X","Y")
means something different then and will do something different, so we may need clarification on what Rahul actualyl did before understanding the issue.
Rahul Gulia
Rahul Gulia 2022년 9월 26일
Thank you @J. Alex Lee and @Adam Danz for your suggestions on the problem statement.
I was not fully aware of the reshape() function, and that seems to be a good solution to my problem.
Thank you guys for your support. It was a great discussion.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by