필터 지우기
필터 지우기

How to change nonzero values to 1 within a table?

조회 수: 12 (최근 30일)
A DDD
A DDD 2019년 12월 19일
댓글: Ridwan Alam 2019년 12월 20일
How to change nonzero values to '1' within a table? for all columns at once.

채택된 답변

Ridwan Alam
Ridwan Alam 2019년 12월 19일
tempTable = table2array(myTable);
tempTable(tempTable~=0)=1;
myTable = array2table(tempTable);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by