HOW To Import Data from Excel to matlab

Started by BALAJI RAMAN March 16, 2004
Hello everybody,

This is my first mail to the group.

I need some help on importing data from excel..

I am not that good at matlab..

I have certain data sets in excel and i would like to plot the x and
y values..

Is there some way that i can access excel files through matlab..

These data sets are huge.

Thanks In advance

Balaji



I usually export the Excel spreadsheet as
space-delimited text document and import the created
file into Matlab using the "load" command. Of course,
I'm making it sound easier than it really is.

If the exported text file is more complicated than
just two simple columns, then you may have to read the
data line-by-line.

First you open the file using:

fid = fopen('myfile.txt');

then read the data with the "fscanf" command.

Finally, you close the file:

fclose(fid);

Again, I'm making it easier than it really is. --- BALAJI RAMAN <>
wrote:
> Hello everybody,
>
> This is my first mail to the group.
>
> I need some help on importing data from excel..
>
> I am not that good at matlab..
>
> I have certain data sets in excel and i would like
> to plot the x and
> y values..
>
> Is there some way that i can access excel files
> through matlab..
>
> These data sets are huge.
>
> Thanks In advance
>
> Balaji

=====
Juan I. Arvelo, Jr., Ph.D.
Johns Hopkins University
11100 Johns Hopkins Rd.
Laurel, MD 20723
240.228.4293

__________________________________



You may try to use "xlsread" Matlab command as well.
 
Rabia"Juan I. Arvelo, Jr., Ph.D." <j...@yahoo.com> wrote:
I usually export the Excel spreadsheet as
space-delimited text document and import the created
file into Matlab using the "load" command. Of course,
I'm making it sound easier than it really is.

If the exported text file is more complicated than
just two simple columns, then you may have to read the
data line-by-line.

First you open the file using:

fid = fopen('myfile.txt');

then read the data with the "fscanf" command.

Finally, you close the file:

fclose(fid);

Again, I'm making it easier than it really is.--- BALAJI RAMAN <b...@yahoo.co.in>
wrote:
> Hello everybody,
>
> This is my first mail to the group.
>
> I need some help on importing data from excel..
>
> I am not that good at matlab..
>
> I have certain data sets in excel and i would like
> to plot the x and
> y values..
>
> Is there some way that i can access excel files
> through matlab..
>
> These data sets are huge.
>
> Thanks In advance
>
> Balaji
=====
Juan I. Arvelo, Jr., Ph.D.
Johns Hopkins University
11100 Johns Hopkins Rd.
Laurel, MD 20723
240.228.4293

__________________________________
/



_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3


" target="_blank">Yahoo! Mail - More reliable, more storage, less spam

better way is to use functions 'xlsread' and 'xlsfinfo'. refer to matlab help
(help xlsread) for details.

--- "Juan I. Arvelo, Jr., Ph.D." <> wrote:
> I usually export the Excel spreadsheet as
> space-delimited text document and import the created
> file into Matlab using the "load" command. Of course,
> I'm making it sound easier than it really is.
>
> If the exported text file is more complicated than
> just two simple columns, then you may have to read the
> data line-by-line.
>
> First you open the file using:
>
> fid = fopen('myfile.txt');
>
> then read the data with the "fscanf" command.
>
> Finally, you close the file:
>
> fclose(fid);
>
> Again, I'm making it easier than it really is. > --- BALAJI RAMAN <>
> wrote:
> > Hello everybody,
> >
> > This is my first mail to the group.
> >
> > I need some help on importing data from excel..
> >
> > I am not that good at matlab..
> >
> > I have certain data sets in excel and i would like
> > to plot the x and
> > y values..
> >
> > Is there some way that i can access excel files
> > through matlab..
> >
> > These data sets are huge.
> >
> > Thanks In advance
> >
> > Balaji
> >
> >
> >
> >
> >
>
> =====
> Juan I. Arvelo, Jr., Ph.D.
> Johns Hopkins University
> 11100 Johns Hopkins Rd.
> Laurel, MD 20723
> 240.228.4293
>
> __________________________________
>


__________________________________


better way is to use functions 'xlsread' and 'xlsfinfo'. refer to matlab help
(help xlsread) for details.

--- "Juan I. Arvelo, Jr., Ph.D." <> wrote:
> I usually export the Excel spreadsheet as
> space-delimited text document and import the created
> file into Matlab using the "load" command. Of course,
> I'm making it sound easier than it really is.
>
> If the exported text file is more complicated than
> just two simple columns, then you may have to read the
> data line-by-line.
>
> First you open the file using:
>
> fid = fopen('myfile.txt');
>
> then read the data with the "fscanf" command.
>
> Finally, you close the file:
>
> fclose(fid);
>
> Again, I'm making it easier than it really is. > --- BALAJI RAMAN <>
> wrote:
> > Hello everybody,
> >
> > This is my first mail to the group.
> >
> > I need some help on importing data from excel..
> >
> > I am not that good at matlab..
> >
> > I have certain data sets in excel and i would like
> > to plot the x and
> > y values..
> >
> > Is there some way that i can access excel files
> > through matlab..
> >
> > These data sets are huge.
> >
> > Thanks In advance
> >
> > Balaji
> >
> >
> >
> >
> >
>
> =====
> Juan I. Arvelo, Jr., Ph.D.
> Johns Hopkins University
> 11100 Johns Hopkins Rd.
> Laurel, MD 20723
> 240.228.4293
>
> __________________________________
>


__________________________________


You may try to use "xlsread" Matlab command as well.
 
Rabia"Juan I. Arvelo, Jr., Ph.D." <j...@yahoo.com> wrote:
I usually export the Excel spreadsheet as
space-delimited text document and import the created
file into Matlab using the "load" command. Of course,
I'm making it sound easier than it really is.

If the exported text file is more complicated than
just two simple columns, then you may have to read the
data line-by-line.

First you open the file using:

fid = fopen('myfile.txt');

then read the data with the "fscanf" command.

Finally, you close the file:

fclose(fid);

Again, I'm making it easier than it really is.--- BALAJI RAMAN <b...@yahoo.co.in>
wrote:
> Hello everybody,
>
> This is my first mail to the group.
>
> I need some help on importing data from excel..
>
> I am not that good at matlab..
>
> I have certain data sets in excel and i would like
> to plot the x and
> y values..
>
> Is there some way that i can access excel files
> through matlab..
>
> These data sets are huge.
>
> Thanks In advance
>
> Balaji
=====
Juan I. Arvelo, Jr., Ph.D.
Johns Hopkins University
11100 Johns Hopkins Rd.
Laurel, MD 20723
240.228.4293

__________________________________
/



_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  m...@yahoogroups.com

To Post:  m...@yahoogroups.com

To Leave: m...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/matlab

More DSP-Related Groups: http://www.dsprelated.com/groups.php3


" target="_blank">Yahoo! Mail - More reliable, more storage, less spam

I usually export the Excel spreadsheet as
space-delimited text document and import the created
file into Matlab using the "load" command. Of course,
I'm making it sound easier than it really is.

If the exported text file is more complicated than
just two simple columns, then you may have to read the
data line-by-line.

First you open the file using:

fid = fopen('myfile.txt');

then read the data with the "fscanf" command.

Finally, you close the file:

fclose(fid);

Again, I'm making it easier than it really is. --- BALAJI RAMAN <>
wrote:
> Hello everybody,
>
> This is my first mail to the group.
>
> I need some help on importing data from excel..
>
> I am not that good at matlab..
>
> I have certain data sets in excel and i would like
> to plot the x and
> y values..
>
> Is there some way that i can access excel files
> through matlab..
>
> These data sets are huge.
>
> Thanks In advance
>
> Balaji

=====
Juan I. Arvelo, Jr., Ph.D.
Johns Hopkins University
11100 Johns Hopkins Rd.
Laurel, MD 20723
240.228.4293

__________________________________



Hello everybody,

This is my first mail to the group.

I need some help on importing data from excel..

I am not that good at matlab..

I have certain data sets in excel and i would like to plot the x and
y values..

Is there some way that i can access excel files through matlab..

These data sets are huge.

Thanks In advance

Balaji