필터 지우기
필터 지우기

Converting cell array to double?

조회 수: 2 (최근 30일)
Rightia Rollmann
Rightia Rollmann 2016년 8월 11일
편집: Azzi Abdelmalek 2016년 8월 11일
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일
A = { 'B 1'; 'B 12'; 'B123' }
B=str2double(regexp(A,'\d+','match','once'))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by