MATLAB Answers

How to change nonzero values to 1 within a table?

4 views (last 30 days)
A DDD on 19 Dec 2019
Commented: Ridwan Alam on 20 Dec 2019
How to change nonzero values to '1' within a table? for all columns at once.


Sign in to comment.

Accepted Answer

Ridwan Alam
Ridwan Alam on 19 Dec 2019
tempTable = table2array(myTable);
myTable = array2table(tempTable);

More Answers (0)

Community Treasure Hunt

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

Start Hunting!