Problem 2704. Find Sign(Zero Crossing) Changes in Array
Example; A = [1 2 3 -3 -4 -1 -24 2 4 -1 -2 3 1];
ans;
[1 2 0 -3 -4 -1 0 2 0 -1 0 3 1]
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
Dyuman Joshi
on 4 Nov 2021
@Chris, the question asks to make the points zero where the neighbourhood elements are opposite in sign.
Christian Schröder
on 5 Jan 2023
This really needs a better problem description --- the original author's intention is not at all clear.
Christian Schröder
on 5 Jan 2023
(And in fact the original author's own solution does not pass the updated test suite anymore.)
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
3437 Solvers
-
Find the sum of the elements in the "second" diagonal
1163 Solvers
-
Find nearest prime number less than input number
862 Solvers
-
612 Solvers
-
Matlab Basics II - Count rows in a matrix
382 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!