Problem 47068. Set zero
given a matrix, set all elements with row and/or column numbers of 2 to end-1 equal to zero:
x = ones(3);
y_correct = [1 1 1;1 0 1;1 1 1];
Solution Stats
Problem Comments
-
1 Comment
Rafael S.T. Vieira
on 28 Oct 2020
The problem description should be set all numbers that are not on a border to zero.
Solution Comments
Show commentsProblem Recent Solvers56
Suggested Problems
-
Return the 3n+1 sequence for n
8481 Solvers
-
Flip the main diagonal of a matrix
901 Solvers
-
Create a two dimensional zero matrix
523 Solvers
-
Matlab Basics - Switching Assignments
502 Solvers
-
1542 Solvers
More from this Author29
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!