フィルターのクリア

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 Center および File ExchangeGraphics Performance についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by