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 Solvers213
Suggested Problems
-
Back to basics 25 - Valid variable names
299 Solvers
-
Celsius to Fahrenheit converter
480 Solvers
-
find the maximum element of the matrix
405 Solvers
-
610 Solvers
-
Matlab Basics - y as a function of x
401 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!