On 7/9/2014 5:27 AM, Ciara wrote:
> Hello,
>
> I know this is a very simple question, but googling it really hasn't
> helped, and I've tried many different things. I have a .csv file that
> contains 72 numerical values in one column, and nothing else. I am
> using:
> precipitation=dlmread('C://Users/sophysics/Desktop/annual.xlsx','\t')
>
> but getting the error:
> Error using dlmread (line 139)
> Mismatch between file and format string.
> Trouble reading number from file (row 1u, field 1u) ==> PK
...
According to the file extension, it isn't a .csv file at all but an
Excel file. That looks extremely likely to be the case given the error
that shows the ASCII string "PK" that was found; not a numeric value.
Try
precip=xlsread('C://Users/sophysics/Desktop/annual.xlsx');
instead. BTW, why would you try a delimiter of \t for a comma-separated
file, even if it were .csv instead of .xls(x)?
--