Effacer les filtres
Effacer les filtres

3D plotting of annual data

2 vues (au cours des 30 derniers jours)
Aaron Burdick
Aaron Burdick le 16 Oct 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 commentaire
Star Strider
Star Strider le 17 Oct 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.

Connectez-vous pour commenter.

Réponses (1)

Doug Hull
Doug Hull le 17 Oct 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 commentaire
Star Strider
Star Strider le 17 Oct 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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by