Problem 1957. Check if equal
Solution Stats
Problem Comments
Solution Comments
-
1 Comment
Soobok
on 4 Nov 2020
function y = checkIfequal(x)
for i = 1 : length(x(1:end))-1
if x(i)==x(i+1)
y=logical(1)
else
y=logical(0)
break
end
end
Problem Recent Solvers216
Suggested Problems
-
21035 Solvers
-
2700 Solvers
-
The Goldbach Conjecture, Part 2
1738 Solvers
-
The sum of the numbers in the vector
495 Solvers
-
Create an index-powered vector
490 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!