Converting cell array to double?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Azzi Abdelmalek
2016년 8월 11일
편집: Azzi Abdelmalek
2016년 8월 11일
A = { 'B 1'; 'B 12'; 'B123' }
B=str2double(regexp(A,'\d+','match','once'))
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!