How to make a 1D become 2D and create a contourf plot
8 ビュー (過去 30 日間)
古いコメントを表示
Kafayat Olayinka
2020 年 2 月 11 日
コメント済み: Kafayat Olayinka
2020 年 2 月 14 日
Let say:
time=[1:10];
height=[100:100:1000];
temp=[273:1:282];
So as, i can plot(time,temp)
and i can also plot(temp,height)
How can I make newTemp(time,height) so that I can make a contourf plot such that
v-[1:1:100]
contourf(time,height,newTemp,v)
2 件のコメント
採用された回答
Ajay Pattassery
2020 年 2 月 14 日
You could use meshgrid which returns the 2-D grid coordinates contained in the vectors time and height.
[timeX,heightY] = meshgrid(time, height);
Then You can define newTemp for all the values of [timeX,heightY] and use contourf.
v-[1:1:100]
contourf(timeX,heightY,newTemp,v);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Contour Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!