From: Chris on
Hi,

I have an excel sheet with sediment data ~1500 rows, each row is comprised of various data such as station id, lat, long, particle diameter etc. There are about 75 different stations and about 20 samples from each station. I am looking to calculate the average diameter in matlab of each station based on it's station id #. Thanks for the help.
From: Wayne King on
"Chris " <chris.veinot(a)hotmail.com> wrote in message <htok3o$7a5$1(a)fred.mathworks.com>...
> Hi,
>
> I have an excel sheet with sediment data ~1500 rows, each row is comprised of various data such as station id, lat, long, particle diameter etc. There are about 75 different stations and about 20 samples from each station. I am looking to calculate the average diameter in matlab of each station based on it's station id #. Thanks for the help.

Hi Chris, have you read the data into Matlab using xlsread? It should be a simple matter of calculating the mean at that point.

Wayne
From: Chris on
"Wayne King" <wmkingty(a)gmail.com> wrote in message <htokis$7k4$1(a)fred.mathworks.com>...
> "Chris " <chris.veinot(a)hotmail.com> wrote in message <htok3o$7a5$1(a)fred.mathworks.com>...
> > Hi,
> >
> > I have an excel sheet with sediment data ~1500 rows, each row is comprised of various data such as station id, lat, long, particle diameter etc. There are about 75 different stations and about 20 samples from each station. I am looking to calculate the average diameter in matlab of each station based on it's station id #. Thanks for the help.
>
> Hi Chris, have you read the data into Matlab using xlsread? It should be a simple matter of calculating the mean at that point.
>

I'm fairly new to Matlab, but yes I can read the spreadsheet, I'm just not sure how to read specific colums and rows.
> Wayne
From: Wayne King on
"Chris " <chris.veinot(a)hotmail.com> wrote in message <htol1c$6ht$1(a)fred.mathworks.com>...
> "Wayne King" <wmkingty(a)gmail.com> wrote in message <htokis$7k4$1(a)fred.mathworks.com>...
> > "Chris " <chris.veinot(a)hotmail.com> wrote in message <htok3o$7a5$1(a)fred.mathworks.com>...
> > > Hi,
> > >
> > > I have an excel sheet with sediment data ~1500 rows, each row is comprised of various data such as station id, lat, long, particle diameter etc. There are about 75 different stations and about 20 samples from each station. I am looking to calculate the average diameter in matlab of each station based on it's station id #. Thanks for the help.
> >
> > Hi Chris, have you read the data into Matlab using xlsread? It should be a simple matter of calculating the mean at that point.
> >
>
> I'm fairly new to Matlab, but yes I can read the spreadsheet, I'm just not sure how to read specific colums and rows.
> > Wayne

I'm not sure I understand your data structure. When you say:
"> I have an excel sheet with sediment data ~1500 rows, each row is comprised of various data such as station id, lat, long, particle diameter etc."
Are you saying that each row is one kind of data, e.g. station id, or in each row do you have multiple measurements of different data, e.g. station id, lat, long, etc.

You can also do File -> Import Data and Matlab will basically walk you through importing the data, including creating a variable based on a row or column header.

Wayne
From: us on
"Chris " <chris.veinot(a)hotmail.com> wrote in message <htol1c$6ht$1(a)fred.mathworks.com>...
> "Wayne King" <wmkingty(a)gmail.com> wrote in message <htokis$7k4$1(a)fred.mathworks.com>...
> > "Chris " <chris.veinot(a)hotmail.com> wrote in message <htok3o$7a5$1(a)fred.mathworks.com>...
> > > Hi,
> > >
> > > I have an excel sheet with sediment data ~1500 rows, each row is comprised of various data such as station id, lat, long, particle diameter etc. There are about 75 different stations and about 20 samples from each station. I am looking to calculate the average diameter in matlab of each station based on it's station id #. Thanks for the help.
> >
> > Hi Chris, have you read the data into Matlab using xlsread? It should be a simple matter of calculating the mean at that point.
> >
>
> I'm fairly new to Matlab, but yes I can read the spreadsheet, I'm just not sure how to read specific colums and rows.
> > Wayne

a hint:

help xlsread; % <- now, peruse the example section...

us