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.
235 Solvers
620 Solvers
Set the array elements whose value is 13 to 0
944 Solvers
366 Solvers
Fahrenheit to Celsius converter
358 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!