Path: news.mathworks.com!not-for-mail
From: "Sean de " <sean.dewolski@nospamplease.umit.maine.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Data Subsampling
Date: Tue, 23 Nov 2010 19:19:04 +0000 (UTC)
Organization: University of Maine
Lines: 14
Message-ID: <ich438$725$1@fred.mathworks.com>
References: <ich2vm$mbl$1@fred.mathworks.com>
Reply-To: "Sean de " <sean.dewolski@nospamplease.umit.maine.edu>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1290539944 7237 172.30.248.37 (23 Nov 2010 19:19:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 23 Nov 2010 19:19:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2256903
Xref: news.mathworks.com comp.soft-sys.matlab:689417

"Billy Bob" <jforwin@gmail.com> wrote in message <ich2vm$mbl$1@fred.mathworks.com>...
> Hi 
> I have a relatively simple problem that I can't figure out an elegant way to solve.
> 
> I have a data set consisting of:
> 
> Column 1: a series of days numbered 1 to 365 or 366 for each year from 1974 until now
> Column 2: average daily temperature on each day
> 
> What I would like to do is to produce a matrix of years (x), days (y) and temperature (z). So far I have been able to do this for Day 1 for all years using a combination of row and column indices but I am unsure of how to this for all days across all years. Any help would be greatly appreciated.
> 
> Thanks.

It sounds like ACCUMARRAY might be what you want.  Feed it your days/years as subs,  [days years], and the temperatures as vals, [T].  It'll then place all of the T's in their respective positions.