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 ]

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 8월 11일
편집: Azzi Abdelmalek 2016년 8월 11일

1 개 추천

A = { 'B 1'; 'B 12'; 'B123' }
B=str2double(regexp(A,'\d+','match','once'))

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by