Error ~= Invalid types for comparison
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi,
I tried to run this code:
D2sub1.RETsm(D2sub1.ID ~= lagmatrix(D2sub1.ID, 1)) = NaN;
and get the error
Error using ~= (line 30)
Invalid types for comparison.
ID is a categorical column.
Is it not possible to compare categorical variables like this?
Thanks,
댓글 수: 4
Jan
2021년 4월 17일
You mention, that ID is a categrical variable, but what is "lagmatrix"? Please post a small example of your inputs.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!