what dos this instruction mean
이전 댓글 표시
i meet this instruction when analyzing a matlab file could you help me what does it mean ?
yone=(y==i)+(y~=i)*-1;
when y is a column vector and i is fix number i=4;
what will be the size of yone in this case ?
답변 (1개)
Walter Roberson
2013년 5월 16일
0 개 추천
A value of "1" where the entries are "i", and a value of "-1" where the entries are not "i", and 0 where the entries are NaN.
댓글 수: 1
Jan
2013년 5월 16일
Equivalent:
yone = 2 * (y==i) - 1;
카테고리
도움말 센터 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!