Cant convert more than 80 columns of data to categorical
조회 수: 1 (최근 30일)
이전 댓글 표시
I am trying to convert all coloumns of a 1000x170 table to categorical data. "bt_000" would be the 81st coloumn.
It would seem that the function does not work after the 80th coloumn, any remedies?
Thank you.
댓글 수: 1
dpb
2020년 11월 29일
It's not the number or the postion but the content of the column that's the problem, methinks.
Bet it will error the same way if you try that column alone.
채택된 답변
Walter Roberson
2020년 11월 29일
When you categorical() numeric values, then internally it uses %-0.5g format to convert the values to character vectors. It then errors if the number of unique values that result is different than the number of unique numbers.
Which is to say that when you categorical() numeric values, it is a problem if two of the unique values are the same up to the 5th decimal digit.
댓글 수: 3
dpb
2020년 11월 29일
That doesn't say it errors because of it, though...that's probably worth a documentation addendum note (not that anybody ever actually reads the doc first).
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Categorical Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!