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

43 views (last 30 days)
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.

Accepted Answer

Ameer Hamza
Ameer Hamza on 22 Oct 2020
It can work on table as well. Try something like this
T.x = erase(T.x, '-')
  4 Comments
Frank Huetten
Frank Huetten on 22 Oct 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.

Sign in to comment.

More Answers (0)

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!