http://www.mathworks.com/matlabcentral/newsreader/view_thread/253679
MATLAB Central Newsreader  dlmread error??
Feed for thread: dlmread error??
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Mon, 15 Jun 2009 02:26:01 +0000
dlmread error??
http://www.mathworks.com/matlabcentral/newsreader/view_thread/253679#657255
Jack
I am new to matlab and I have a csv file that I am trying to import; however, I am getting an error:<br>
>> M = dlmread('ADRY_Pre_Leg_WCONT_rms.csv', ' ', 2, 1);<br>
??? Index exceeds matrix dimensions.<br>
Error in ==> dlmread at 150<br>
result = result{1};<br>
<br>
Can anyone please explain this to me or describe how I should be importing this file?<br>
<br>
The file has 92800 rows and 12 columns; each row is a different variable.<br>
<br>
Any help is appreciated!<br>
Thanks!

Mon, 15 Jun 2009 02:41:01 +0000
Re: dlmread error??
http://www.mathworks.com/matlabcentral/newsreader/view_thread/253679#657258
Sadik
Perhaps the function xlsread is going to work.<br>
<br>
"Jack " <use.text.after.underscore.only_jcannon@csu.edu.au> wrote in message <h14bfp$gvv$1@fred.mathworks.com>...<br>
> I am new to matlab and I have a csv file that I am trying to import; however, I am getting an error:<br>
> >> M = dlmread('ADRY_Pre_Leg_WCONT_rms.csv', ' ', 2, 1);<br>
> ??? Index exceeds matrix dimensions.<br>
> Error in ==> dlmread at 150<br>
> result = result{1};<br>
> <br>
> Can anyone please explain this to me or describe how I should be importing this file?<br>
> <br>
> The file has 92800 rows and 12 columns; each row is a different variable.<br>
> <br>
> Any help is appreciated!<br>
> Thanks!

Mon, 15 Jun 2009 02:47:01 +0000
Re: dlmread error??
http://www.mathworks.com/matlabcentral/newsreader/view_thread/253679#657260
Sadik
Actually I have realized that there is a function called csvread. But help says: "The file can only contain numeric values."<br>
<br>
<br>
"Sadik " <sadik.hava@gmail.com> wrote in message <h14cbt$ag6$1@fred.mathworks.com>...<br>
> Perhaps the function xlsread is going to work.<br>
> <br>
> "Jack " <use.text.after.underscore.only_jcannon@csu.edu.au> wrote in message <h14bfp$gvv$1@fred.mathworks.com>...<br>
> > I am new to matlab and I have a csv file that I am trying to import; however, I am getting an error:<br>
> > >> M = dlmread('ADRY_Pre_Leg_WCONT_rms.csv', ' ', 2, 1);<br>
> > ??? Index exceeds matrix dimensions.<br>
> > Error in ==> dlmread at 150<br>
> > result = result{1};<br>
> > <br>
> > Can anyone please explain this to me or describe how I should be importing this file?<br>
> > <br>
> > The file has 92800 rows and 12 columns; each row is a different variable.<br>
> > <br>
> > Any help is appreciated!<br>
> > Thanks!

Mon, 15 Jun 2009 03:00:18 +0000
Re: dlmread error??
http://www.mathworks.com/matlabcentral/newsreader/view_thread/253679#657262
Kian
Try dragging and dropping your XLS file into MATLAB's Command Window. It will bring up a window and you will be able to specify what delimeter you'd like to use to parse the data.

Mon, 15 Jun 2009 03:03:00 +0000
Re: dlmread error??
http://www.mathworks.com/matlabcentral/newsreader/view_thread/253679#657264
Kian
Also, what happens when you use:<br>
<br>
dlmread('ADRY_Pre_Leg_WCONT_rms.csv', ' ', 2, 1)<br>
<br>
without assigning it to a variable (i.e. M)? Will it read it?<br>
<br>
Also, what kinda data are you trying to read? Numbers? Text? Mixed?

Mon, 15 Jun 2009 03:24:02 +0000
Re: dlmread error??
http://www.mathworks.com/matlabcentral/newsreader/view_thread/253679#657265
Jack
Thanks everyone for your suggestions... I fixed the problem using the csvread function and specifying the R and C where the numeric data starts..<br>
<br>
Thanks again.<br>
Jack