Effacer les filtres
Effacer les filtres

remove the first 2 char of a string

7 vues (au cours des 30 derniers jours)
nayan
nayan le 1 Avr 2021
Commenté : nayan le 1 Avr 2021
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?!

Réponse acceptée

Stephen23
Stephen23 le 1 Avr 2021
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 commentaire
nayan
nayan le 1 Avr 2021
thank you - feel stupid asking such an easy qu. Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by