i want to use fonction(unique) to get un string ,but it awlays shows Error using cell/unique?Can anyone tell me what I am doing wrong here? thank you
조회 수: 1 (최근 30일)
이전 댓글 표시
P={pa(1),pa(2),pa(3),pa(4),pa(5)};
H=unique(P,'rows');
Error using cell/unique (line 95)
Input A must be a cell array of strings.
댓글 수: 0
채택된 답변
Mischa Kim
2014년 10월 4일
pengcheng, use
P = [pa(1),pa(2),pa(3),pa(4),pa(5)];
H = unique(P);
instead.
댓글 수: 2
Guillaume
2014년 10월 4일
Or even simpler:
P = pa(1:5);
H = unique(P); % don't need the 'rows' option in any case
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!