Clear Filters
Clear Filters

How to change nonzero values to 1 within a table?

12 views (last 30 days)
How to change nonzero values to '1' within a table? for all columns at once.

Accepted Answer

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

More Answers (0)


Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!