Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
nocheat = isempty(regexp(evalc('type matched_op'),'([^f]eval|regexprep|inline|str2func)'));
x = [1 2;3 4];
y = [1 2];
z_correct = [1 4;3 8];
assert(isequal(matched_op(x,y,'times'),z_correct) && nocheat)
|
2 | Pass |
nocheat = isempty(regexp(evalc('type matched_op'),'([^f]eval|regexprep|inline|str2func)'));
x = [10i];
y = [20];
z_correct = [-2i];
assert(isequal(matched_op(x,y,'ldivide'),z_correct) && nocheat)
|
3 | Pass |
nocheat = isempty(regexp(evalc('type matched_op'),'([^f]eval|regexprep|inline|str2func)'));
x = reshape(1:4,[1 1 1 4]);
y = (1:4).';
z_correct = reshape([2 3 4 5 3 4 5 6 4 5 6 7 5 6 7 8],[4 1 1 4]);
assert(isequal(matched_op(x,y,'plus'),z_correct) && nocheat)
z(:,:,1,1) =
2
3
4
5
z(:,:,1,2) =
3
4
5
6
z(:,:,1,3) =
4
5
6
7
z(:,:,1,4) =
5
6
7
8
|
329 Solvers
Put two time series onto the same time basis
174 Solvers
250 Solvers
521 Solvers
331 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!