Is it possible to remove a certain character (dash sign / -) from an entire column in a table.

37 Ansichten (letzte 30 Tage)
Is it possible to remove a certain character (dash sign / -) from an entire column in a table.
The erase function seems to work only after I converted the table to cell.

Akzeptierte Antwort

Ameer Hamza
Ameer Hamza am 22 Okt. 2020
It can work on table as well. Try something like this
T.x = erase(T.x, '-')
  4 Kommentare
Frank Huetten
Frank Huetten am 22 Okt. 2020
Good to know, then I was at least not completely lost. However, your first solution is working much better / robust in case the table gets additional columns in the future, as the columns have names already.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by