MATLAB: Reading data out of a character cell array – all values, and save those in a new variable

accesscell arraysStatistics and Machine Learning Toolbox

Dear Matlab-Gods out there!
My situation: I created a server to access data from my database. So my data is automatically stored in a cell array. (6 lines with information like time, name, values of my measurement, …) Now I'd like to visualize these measurements, but first of all of course read out the line of data including those.
Structure: My data is stored in a 6×1400 cell array. I got different data types, from double to char inside of it. For example in line 5 I can find all my measurement values, saved as char.
My approaches so far: If I'd like to access data out of a cell array I try it as followed.
datensatz{5,:};
Typing this into the command window, everything works out fine: I get all the input of row 5. Though if I write it into the editor, all I get for
mw=datensatz{5,:};
messwert=str2num(mw);
is the very first value of my data. Actually I got more than a 1000 values in there. Might this be a problem too?
Can anyone give me a hint on how to proceed? I'd really appreciate any comment!
Best regards.

Best Answer

If that row of the cell array contains numeric values stored in char vectors, then you can easily convert these to numeric:
vec = str2double(datensatz(5,:))