Returns a dataset.
x = getdata() [x,txt] = getdata() x = getdata(i) [x,txt] = getdata(i)
a 1-by-1 matrix of floating point integer, the dataset index, in the range 1,2,...,23
a m-by-n matrix of doubles, the data
a m-by-1 matrix of strings, the header of the dataset.
Returns famous datasets. Each dataset is made of a header presenting the content of the dataset (to be stored into txt) and the data (to be stored into x).
Without input argument, opens an interactive dialog asking the user to choose one dataset. If the user cancels, returns the empty matrix into x and and empty string into txt.
With one input argument i, returns the dataset #i.
With one output argument x, returns the data into x and opens an interactive dialog displaying the header.
With two output arguments x and txt, returns the data into x and the header into txt.
The txt header is structured as follows:
The following is the list of datasets available:
1 Phosphorus 2 Scottish Hill Race 3 Salary Survey 4 Health Club 5 Brain and Body Weight 6 Cement 7 Colon Cancer 8 Growth 9 Consumption Function 10 Cost-of-Living 11 Demographic 12 Cable 13 Service call 14 Phone call 15 Turnover 16 Unemployment 17 Quality Control 18 Graphics cards 19 Data Processing System development 20 Paper 21 Bulb 22 Memory Chip 23 French firm | ![]() | ![]() |
// A regular call [x,txt] = getdata(10) // Displays only the header [x,txt] = getdata(10); txt // Select the dataset interactively. [x,txt] = getdata() // Display the header interactively. x = getdata(10) // Select the dataset interactively and // display the header interactively. x = getdata() // A short abstract of all datasets for i = 1 : 23 [x,txt] = getdata(i); txt_title=txt(1); mprintf("Dataset #%3d: %-30s (%3d-by-%-3d)\n",i,txt_title,size(x,"r"),size(x,"c")); end // A longer abstract of all datasets for i = 1 : 23 [x,txt] = getdata(i); txt_title=txt(1); txt_source=txt(2); txt_from=txt(3); txt_dims=txt(4); txt_descr=txt(5:$); abstract = strcat(txt_descr(:)," "); abstract = part(abstract,1:80)+"..."; mprintf("\nDataset #%3d: %-30s (%3d-by-%-3d)\n",i,txt_title,size(x,"r"),size(x,"c")); mprintf("\t%s\n",txt_source); mprintf("\t%s\n",txt_from); mprintf("\t%s\n",txt_dims); mprintf("\t%s\n",abstract); end | ![]() | ![]() |