Converting cell array to double?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rightia Rollmann
am 11 Aug. 2016
Bearbeitet: Azzi Abdelmalek
am 11 Aug. 2016
How can I convert the cell array A into the column vector B? (Deleting the letter B and leading white spaces)
A = { 'B 1'; 'B 12'; 'B123' }
B = [ 1; 12; 123 ]
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 11 Aug. 2016
Bearbeitet: Azzi Abdelmalek
am 11 Aug. 2016
A = { 'B 1'; 'B 12'; 'B123' }
B=str2double(regexp(A,'\d+','match','once'))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Types 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!