Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
F = @sin;
[G,C] = function_call_counter(F);
expected = 0;
actual = C();
assert(isequal(expected,actual))
|
2 | Pass |
N = 500;
omega = linspace(0,2*pi,N);
rng shuffle
K = 5;
omega_k = omega(randi([1 500],1,K));
F = @cos;
[G,C] = function_call_counter(F);
expected = F(omega_k);
actual = G(omega_k);
expected_count = 1;
actual_count = C();
assert(isequal(expected,actual))
assert(isequal(expected_count,actual_count))
|
3 | Pass |
F = @sin;
[G,C] = function_call_counter(F);
K = randi([0 1000],1,1);
for k = 1:K
G(pi);
end
expected = K;
actual = C();
assert(isequal(expected,actual))
|
5704 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
781 Solvers
Find the repeating decimal pattern!
14 Solvers
69 Solvers
Fermat's Last Theorem - Fermat's conjecture
68 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!