Contour Plot Date/Depth/Temperature
显示 更早的评论
I am trying to create a Contour Plot containing the values: Date/Waterdepth/Temperature. The table looks like that in Excel, were blue=depth, orange=dates and green=temperature:

Here is my code and the error I receive:
data = readtable('temperatur.xls','Range','A1:H21');
x = data(2:end,1);
y = data(1,2:end);
z = data(2:end,2:end);
contourf(x, y, z);

It appears to me that Matlab has an issue with the date-time format. I have tried to use numerous different date formats but could not get it to work. The XLS file is attached to this question. Any help is very much appreciated!
2 个评论
Dennis Mayk
2018-5-19
编辑:Dennis Mayk
2018-5-19
Ruben
2022-7-15
Hello, I am trying to do the exact same thing however my datetime values are in MM/DD/YY HH:MM:SS since I have data for every 5 minutes. I get the same exact issues, except datenum just fails outright. Any suggestions?

回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Contour Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!