0

I am getting zero values while using xlsread command in MATLAB.I am using a real world dataset taken from UCI repository which has got both integer and float values.

[Train,textData,rawData] = `xlsread('C:\Users\pooja\Documents\project\breastcancer.csv');`

I have tried with xls format too..

[Train,textData,rawData] = xlsread('C:\Users\pooja\Documents\project\breastcancer.xls');

Thanx in Advance..!

Pooja
  • 59
  • 3
  • 8
  • You tried .csv and .xls? What format is your dataset? Dont try random formats, try the one you have... Also, reading zero values? As far as I know, the dataset can be all zero. – Ander Biguri Mar 17 '15 at 09:48
  • @Ander Biguri::data format is .csv..I didnt get u..all values zero?? – Pooja Mar 17 '15 at 11:16

1 Answers1

1

In the wide world of computers, there are a lot of data formats. You need to remember that data formats are different from each other. Generally software like Matlab allows you to open different types of data formats. Each one of course with its own function.

You can guess that the function xmlread is to read XML files. If you want to read csv files or any other type of file in the world, please (I think this is obvious) do not use xmlread!

Specifically to open csv files matlab has csvread. Please, do not use csv read to open files that are not CSV.....

Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
  • ...Thanku for ur reply...I tried using csvread for the same file saved in .csv format...and Also I tried xlsread for the same file saved in .xls format...but in the first case I got this error-----> **Error using csvread Too many output arguments** ...The dataset is not normalized .Could this be the cause of error? – Pooja Mar 17 '15 at 18:51
  • 1
    sorry..and Thanku very much...so far I have been working with only one dataset(cancer dataset from UCI)..and it didntt work for this dataset..only now I realized that it works perfectly for other datasets like glass dataset from the UCI repository...but I wud like to know the reason for this dataset being zero. – Pooja Mar 20 '15 at 10:28
  • @Pooja Without seing the datasheet I cannot help you more! – Ander Biguri Mar 20 '15 at 10:49