How to create a smooth heatmap for 1D ?
이전 댓글 표시
I have the temperature values for the variable Y for 8 node points in 1D . Now when I try to plot I get the temperature gradient as individual boxes as shown below. I dont want this. The code for achieving this result is shown below

Y =
1.0e+03 *
4.1962
3.5087
2.8783
2.3026
1.7775
1.2967
0.8516
0.4318
figure(1)
imagesc(Y)
axis equal
axis off
colorbar;

I need to get an smooth image like the one shown in second figure where the transition is smooth between the temperature gradients.
Any help will be appreciated !
댓글 수: 1
infinity
2019년 7월 13일
Hello,
The problem is that your data is very coarse. You got the temperature only at 8 points. One of the tasks you shoud be done first is to inpterpolate your data to the finer mesh.
When you obtain smoother data, you can plot smoother figure.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!