3D plotting of annual data

2 次查看(过去 30 天)
Aaron Burdick
Aaron Burdick 2012-10-16
Hi there,
I have a dataset with Z values for every minute of 1 year (499,217 entries). I would like to display this data on a 3D shaded surface plot with axes being:
1. Day of the year 2. Minute of the day 3. Z values for each minute
Right now I have a huge data table with 1 column of minutes (w/ a small number of data holes) and another column of Z values.
Thanks!
Aaron
  1 个评论
Star Strider
Star Strider 2012-10-17
The problem is that you don't have data for every minute of one year ( 525600 minutes, assuming a 365-day year ). If you have data for 499217 minutes, by my calculations that means you have data for 346 days, 16 hours, and 17 minutes. You need to decide how you want to represent your data in that situation.

请先登录,再进行评论。

回答(1 个)

Doug Hull
Doug Hull 2012-10-17
Since there is not all the data needed, you will need to pad it with NaN. It would look something like this.
Data = [1 2 3 4 5 6 7 8 9 10];
numRows = 4
numCols = 3
Data(end+1:numRows*numCols) = nan;
Data = reshape(Data,[numRows,numCols])
mesh(Data)
  1 个评论
Star Strider
Star Strider 2012-10-17
That works if the data are continuously recorded but stop before the end of the year. If there are gaps during the year, interp1 might be a better option.
That's why I suggested we need more information.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by