How to compare two elements in an array with not equal operator(~=)?
이전 댓글 표시
for i=2:1:length(R)
if(R(i)==R(i-1))
else
dif=[dif,R(i)];
end
end
dif=[R(1)];
For example if my input is: [ 3 3 3] dif =dif =
3.0000 3.0000
댓글 수: 2
madhan ravi
2018년 10월 7일
What’s R ?
Image Analyst
2018년 10월 7일
Do you mean like
if R(i) ~= R(i-1)
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!