Azzera filtri
Azzera filtri

3D plotting of annual data

2 visualizzazioni (ultimi 30 giorni)
Aaron Burdick
Aaron Burdick il 16 Ott 2012
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 Commento
Star Strider
Star Strider il 17 Ott 2012
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.

Accedi per commentare.

Risposte (1)

Doug Hull
Doug Hull il 17 Ott 2012
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 Commento
Star Strider
Star Strider il 17 Ott 2012
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.

Accedi per commentare.

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by