Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 195327

Submitted on 22 Jan 2013

Incorrect

25Size
Leading solution size is 19.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Fail
 
%%
n = 1;
A = 3;
assert(isequal(matrix_design(n),A))
Error: Size vector must have at least two elements.
2
Fail
 
%%
for n=[2 10 50];
A=matrix_design(n);
assert(sum(abs(eig(matrix_design(n))-3)<1e-3)>= 1 && min(diff(sort(A(:))))>=0.5)
end
Error: Size vector must have at least two elements.