|
On Tue, 09 Feb 2010 05:01:02 -0500, Rachel <rhnaeco@geemale.com> wrote:
> I have two matrices, one of which is data taken at 1 hz, the other which
> is taken at 64hz, and neither of them have anything in common except for
> they start at the same time and end at the same time (only one actually
> HAS time)
>
> I need two elements from the shorter file for each of the records in the
> longer file and so far my thinking is basic: copy each row 64 times and
> then join the matrices. simple. except for i can't think of a way to do
> it quickly.
>
> has anyone got any ideas, or preferably solutions?
>
> The 64 hz file is full of velocity values, the 1 hz file has the pitch
> and roll information of the experiment.
>
> thanks in advance
>
> Rachel
Something like this?
>> singles=1:5
singles =
1 2 3 4 5
>> reps=repmat(singles,[4,1])
reps =
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
>> mults=reps(:)'
mults =
Columns 1 through 13
1 1 1 1 2 2 2 2 3 3 3
3 4
Columns 14 through 20
4 4 4 5 5 5 5
|