Similar Threads

1. Convert dataset to char array - MATLAB

2. Converting a cell array into a dataset

I have two cell arrays obtained from a database fetch:
data (R x C) - contains data with columns of doubles and strings
data_fields (C x 1) - contains column names
I want to create a dataset with C variables (each with R values), that are named using the column names in data_fields, so that I can do further processing.
Any suggestions on how to proceed?
I tried an approach involving xlswrite'ing the data to an Excel-formatted file, and using the dataset constructor to read it back in, but the Excel-formatted file is missing column names. If I then want to fix the variable names in the dataset, I basically have to do a replacedata into a new dataset that I've created with blank data, or am I overlooking a ridiculously easy way to rename variables in a dataset?
My data has 86 columns also makes a low-level I/O solution a bit impractical, as fprintf requires format strings for every field, and my SQL query may change as I continue my program.
I would prefer an approach that doesn't involve file I/O.
Using the dataset constructor and hand-specifying the individual columns in the cell array and matching the appropriate variable names is time-consuming, due to there being so many columns, plus it's not the most elegant solution. Would prefer a solution that works no matter how many columns were returned from the original SQL query.

3. convert an input cell array matrix to a double array - MATLAB

4. Traing dataset,Cross validation dataset,test dataset!

First,i diverse dataset into training dataset and test dataset. Then
i use three-fold cross validation way to diverse training dataset
into training dataset and validation dataset. During the training,i
use early stopping by validation dataset.Then i calculate average MSE
and choose the structure of neural network.But i donot know how to
determine weights of neural network and get final neural network
model which i can use test dataset to evaluate the neural network
model.
Please help me!

5. Traing dataset,validation dataset,testing dataset. - MATLAB

6. Converting a cell array of strings into a readable format

I have an Excel data base that I am reading into Matlab using the
Textread function. When importing the data, I am using %f to create
a double array for the numerical values and %s for the columns
containing the letters to create a cell array of strings. Each
column is its own matrice.
Currently, I cannot figue out how to read a cell array in Matlab. Is
there a way to read the data in the cell array or convert it to a
double matrix so it can then be read? I have tried using {} and
reading the data into matlab differently, however, nothing has worked
so far.
Please help

7. Convert a table in HTML format into a cell array - MATLAB

8. Converting Matlab matrix to xyz column format

I am relatively new to using Matlab and have something I want to do
that should be relatively simple.
I have a matrix in Matlab (189x256) of landscape elevations (meters
above sea level). I want to convert the matrix into x,y,z columns. In
this case x and y are the locations of the element in the matrix (1,1
etc.) and z is the elevation associated with that location.
Is there a relatively simple way to do this in Matlab? I can do it
easily in Fortran, but wanted to know how one would do this in Matlab.
Some other software I want to use for plotting requires an xyz column
format.
Any tips would be appreciated!
Yvonne