Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Data Conversion

5 views
Skip to first unread message

Garba

unread,
May 21, 2013, 6:08:09 AM5/21/13
to
I have a data set, a daily degree data (366 data points) that I want to convert to hourly values (24*366 = 8784 data points). The raw data obtained are averaged hourly values. So I want to reconvert to the hourly values by generating random hourly values that will represent the daily average values. Any hint on a MATLAB script that will do this?

TideMan

unread,
May 21, 2013, 6:31:16 AM5/21/13
to
On Tuesday, May 21, 2013 10:08:09 PM UTC+12, Garba wrote:
> I have a data set, a daily degree data (366 data points) that I want to convert to hourly values (24*366 = 8784 data points). The raw data obtained are averaged hourly values. So I want to reconvert to the hourly values by generating random hourly values that will represent the daily average values. Any hint on a MATLAB script that will do this?

You need to specify both the distribution and the scale parameter.
e.g., normal distribution with standard deviation of x.

Then you would do this:
y=ybar*ones(1,24) + x*randn(366,24);
y=y(:);
where ybar is a column vector (366 x 1) of daily means.

Garba

unread,
May 21, 2013, 7:51:09 AM5/21/13
to
TideMan <mul...@gmail.com> wrote in message <9dbad8fa-0ebf-4846...@googlegroups.com>...
Thanks very much it works, but when I average the 24 hourly values they dont equal the daily value

TideMan

unread,
May 21, 2013, 3:50:43 PM5/21/13
to
ry=x*randn(366,24);
rybar=mean(ry,2);
y=(ybar-rybar)*ones(1,24) + ry;
0 new messages