"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <hsc516$3g7$1@fred.mathworks.com>...
> "Kyle " <kbrig035@uottawa.ca> wrote in message <hsc3co$id0$1@fred.mathworks.com>...
> > Hello,
> >
> > I have several data files that are all discrete parts of the same sample space and I need to concatenate them all into one big array. For example, we might have the following two files:
> >
> > data1.dat:
> > 1 1
> > 2 2
> > 3 3
> > 4 4
> > 5 5
> >
> > data2.dat
> > 6 6
> > 7 7
> > 8 8
> > 9 9
> > 10 10
> >
> > and I need to import them into matlab into a variable that will have the value
> >
> > 1 1
> > 2 2
> > 3 3
> > 4 4
> > 5 5
> > 6 6
> > 7 7
> > 8 8
> > 9 9
> > 10 10
> >
> >
> > now, I can easily import each one separately using importdata, on each one, but then i have two variables. How can I combine them into one?
>
>
> >>datatotal = [data1; data2]; %Note the semi colon that's the vertical concatenation operator
Thank you, and how about horizontal concatenation?
