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!