-
2 Comments
Swati Sarangi
on 10 Nov 2020
Can anyone tell me what's wrong in this code as I am getting the desired result in my laptop?
function y = existsInVector(a,b)
for i=1:length(b)
if a==b(i)
y=1
elseif
i=i+1
if i==3
y=0
end
end
end
end
arsenic 陈
on 11 Mar 2021
u have finished just theexample
function y = existsInVector(a,b)
y=1-isempty(find(a==b));
end
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!