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.
615 Solvers
318 Solvers
309 Solvers
299 Solvers
532 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!