How to change nonzero values to 1 within a table?
11 次查看(过去 30 天)
显示 更早的评论
How to change nonzero values to '1' within a table? for all columns at once.
0 个评论
采纳的回答
Ridwan Alam
2019-12-19
tempTable = table2array(myTable);
tempTable(tempTable~=0)=1;
myTable = array2table(tempTable);
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!