what dos this instruction mean
1 次查看(过去 30 天)
显示 更早的评论
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 ?
0 个评论
回答(1 个)
Walter Roberson
2013-5-16
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.
另请参阅
类别
在 Help Center 和 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!