convert the cell array to double
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi...
I have a cell array of size 31685 X 59. I want convert into a double. I used str2double but it takes longer duration of 130 sec for execution of the conversion.Please suggest me a alternative way to make it faster to lesser than 5 sec.
The first two columns in the cell array are of Date and Time.
Awaiting for earlier response...
Regards, M. Sarfudeen
2 Kommentare
Jan
am 27 Okt. 2014
Please post a minimal example of your data. "Date and Time" could be a string, a serial date number or two diffent columns. What is the wanted output?
Please post the code your are currently using. Then it is much easier to improve the code. Perhaps you only forgot to pre-allocate the output and you can solve this in milliseconds.
Antworten (2)
Orion
am 27 Okt. 2014
Hi,
if your cell array contains only doubles, then use cell2mat.
C = {1 2 ; 3 4};
M = cell2mat(C);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!