How to make a 1D become 2D and create a contourf plot
12 views (last 30 days)
Kafayat Olayinka on 11 Feb 2020
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
Ajay Pattassery on 14 Feb 2020
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.
Refer here for more information about meshgrid.
Refer the section Contours at Ten Levels in following example for usage of contourf.