Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
v = [4 2 3 1 1 3 4 5 1 3];
real_r = [1 0 2 0 0; 0 0 1 0 0; 1 0 0 1 0; 0 1 0 0 1; 1 0 0 0 0];
real_u = 1:5;
[r,u] = recurrence(v);
assert(and(isequal(r,real_r), isequal(u,real_u)));
|
2 | Pass |
%%
v = [1:6,1];
real_r = circshift(eye(6),[0 1]);
real_u = 1:6;
[r,u] = recurrence(v);
assert(and(isequal(r,real_r), isequal(u,real_u)));
|
3 | Pass |
%%
v = [0 0 0 0 0 0];
real_r = 5;
real_u = 0;
[r,u] = recurrence(v);
assert(and(isequal(r,real_r), isequal(u,real_u)));
|
Find the two most distant points
1628 Solvers
1163 Solvers
785 Solvers
6281 Solvers
Solve the set of simultaneous linear equations
273 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!