Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of array; x=3;
y=[ 0 1 0;
1 1 1;
0 1 0];
please pay attention input will be always odd nubmer greater than 1;
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers191
Suggested Problems
-
22541 Solvers
-
Sort a list of complex numbers based on far they are from the origin.
5804 Solvers
-
Matlab Basics II - Extract last 3 elements of a vector
262 Solvers
-
Rotate a matrix for 180 degree
188 Solvers
-
Basic commands - Least common multiple
244 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
this problem seems to have stopped working probably due to function name shadowed by cross-product cross function
Fixed it