if mod(x,2)==0
a = eye(x);
b = fliplr(a);
c= a+b;
else
a = eye(x);
b = fliplr(a);
c= a+b;
c(round(x/2),round(x/2)) = 1;
end
I am getting the right solution on software ... here it is failing ... please help me
solution is in c, output is in y which doesn't exist in workspace.
2215 Solvers
237 Solvers
Back to basics 11 - Max Integer
682 Solvers
228 Solvers
522 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!