필터 지우기
필터 지우기

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