DataSet Construction: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Mathias
imported>Mathias
Line 13: Line 13:




From the command line, the easiest way to create a dataset is to pass an array to the dataset function.  This can be shown by creating an array of random numbers.   
From the command line, the easiest way to create a dataset is to pass an array to the dataset function.  First we will create an array of data to be passed to the dataset function.   


<pre>
<pre>
>> >> randomdata = rand(20,15);
>> t    = [0:0.1:10]';
>> data = dataset(randomdata)
>> x    = [cos(t) sin(t) exp(-t)];
>> data = dataset(x)
   
   
data =  
data =  
       name: randomdata
       name: x
       type: data  
       type: data  
       date: 23-May-2016 11:18:14
       date: 23-May-2016 11:24:53
       data: 20x15 [double]
    moddate: 23-May-2016 11:24:53
       data: 101x3 [double]
       label: {2x1} [array (char)]
       label: {2x1} [array (char)]
               Mode 1  [: ]  
               Mode 1  [: ]  
Line 38: Line 40:
     classid: {2x1} [cell of strings]
     classid: {2x1} [cell of strings]
     include: {2x1} [vector (integer)]
     include: {2x1} [vector (integer)]
               Mode 1  [: 1x20]  
               Mode 1  [: 1x101]  
               Mode 2  [: 1x15]  
               Mode 2  [: 1x3]  
description:
     history: {1x1 cell} [array (char)]
     history: {1x1 cell} [array (char)]
  userdata:
       OTHER: [View Class Summary]
       OTHER: [View Class Summary]</pre>
>>
 
 
</pre>


==Exporting Dataset to desired format==
==Exporting Dataset to desired format==

Revision as of 10:26, 23 May 2016

Getting Started

In general, data is stored in a dataset object.



From a GUI

Using PLS_Toolbox and Solo, it is easy to import data into a dataset object using the data importer. From the workspace browser select File/Import Data to launch the GUI.

From the MATLAB Command Line

From the command line, the easiest way to create a dataset is to pass an array to the dataset function. First we will create an array of data to be passed to the dataset function.

>> t    = [0:0.1:10]';
>> x    = [cos(t) sin(t) exp(-t)];
>> data = dataset(x)
 
data = 
       name: x
       type: data 
       date: 23-May-2016 11:24:53
    moddate: 23-May-2016 11:24:53
       data: 101x3 [double]
      label: {2x1} [array (char)]
               Mode 1  [: ] 
               Mode 2  [: ] 
  axisscale: {2x1} [vector (real)] (axistype)
               Mode 1  [: ] (none) 
               Mode 2  [: ] (none) 
      title: {2x1} [vector (char)]
               Mode 1  [: ] 
               Mode 2  [: ] 
      class: {2x1} [vector (double)]
               Mode 1  [: ] 
               Mode 2  [: ] 
    classid: {2x1} [cell of strings]
    include: {2x1} [vector (integer)]
               Mode 1  [: 1x101] 
               Mode 2  [: 1x3]   
    history: {1x1 cell} [array (char)]
      OTHER: [View Class Summary]
>> 


Exporting Dataset to desired format