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.
423 Solvers
The Answer to Life, the Universe, and Everything
387 Solvers
262 Solvers
276 Solvers
Sort the vector with the given index
99 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!