필터 지우기
필터 지우기

remove the first 2 char of a string

조회 수: 7 (최근 30일)
nayan
nayan 2021년 4월 1일
댓글: nayan 2021년 4월 1일
I am new to Matlab and guess this will be EASY for someone...
I have
','B132-32','B134-22','S132-11','D532-32'
And I would like
'B132-32','B134-22','S132-11','D532-32'
Basically removing the first
',
How can i do this?!

채택된 답변

Stephen23
Stephen23 2021년 4월 1일
What you show is a character vector, not a string. Which makes this easy using indexing:
c = ',''B132-32'',''B134-22'',''S132-11'',''D532-32'
c = ','B132-32','B134-22','S132-11','D532-32'
c(1:2) = []
c = 'B132-32','B134-22','S132-11','D532-32'
  댓글 수: 1
nayan
nayan 2021년 4월 1일
thank you - feel stupid asking such an easy qu. Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by