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 Solvers190
Suggested Problems
-
Remove all the words that end with "ain"
2636 Solvers
-
Return a list sorted by number of occurrences
2890 Solvers
-
557 Solvers
-
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
902 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
398 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