Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
filetext = fileread('regular.m');
assert(isempty(strfind(filetext, 'for')))
assert(isempty(strfind(filetext, 'while')))
|
2 | Pass |
%%
A = 1;
B = 1;
assert(isequal(regular(A),B));
|
3 | Pass |
%%
A = [2 6
5 3
5 6
3 7];
B = [1 2
3 1
3 2
2 3];
assert(isequal(regular(A),B));
|
4 | Pass |
%%
A = [10 2 4 4 2
4 5 6 8 1
6 5 10 3 9
9 9 5 5 5
9 10 3 7 8];
B = [4 1 2 2 2
1 2 4 5 1
2 2 5 1 5
3 3 3 3 3
3 4 1 4 4];
assert(isequal(regular(A),B));
|
5 | Pass |
%%
A = randi(100,80,100);
B = zeros(size(A));
for iter = 1:size(A,2)
[~, ~, B(:, iter)] = unique(A(:,iter));
end
assert(isequal(regular(A),B));
|
128 Solvers
Back to basics 22 - Rotate a matrix
763 Solvers
Convert a structure into a string
95 Solvers
Unique values without using UNIQUE function
171 Solvers
Detect a number and replace with two NaN's
178 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!