From: "Sean de " <>
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$>
References: <ich2vm$mbl$>
Reply-To: "Sean de " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1290539944 7237 (23 Nov 2010 19:19:04 GMT)
NNTP-Posting-Date: Tue, 23 Nov 2010 19:19:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2256903
Xref: comp.soft-sys.matlab:689417

"Billy Bob" <> wrote in message <ich2vm$mbl$>...
> 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.