cell2mat error due to element size?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Aldrich To
am 16 Nov. 2015
Kommentiert: Mohammad Abouali
am 19 Nov. 2015
Hi everyone.
I am getting the following error when I try to convert the cell array to a double.
C =
'104'
'98'
'98'
'98'
'94'
'94'
'100'
'100'
loadrange = str2num(cell2mat(C))
Error using cat
Dimensions of matrices being concatenated are not consistent.
Error in cell2mat (line 83)
m{n} = cat(1,c{:,n});
I believe the error is due to the number of elements not being the same size. Is there a way around this?
Thanks!
0 Kommentare
Akzeptierte Antwort
Mohammad Abouali
am 16 Nov. 2015
Bearbeitet: Mohammad Abouali
am 16 Nov. 2015
C={'104',
'98',
'98',
'98',
'94',
'94',
'100',
'100'};
loadrange = str2double(C)
loadrange =
104
98
98
98
94
94
100
100
2 Kommentare
Weitere Antworten (0)
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!