Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
y_correct = [1.0000 0.7246 0.1554 -0.4232 -0.7524 -0.7118 -0.3583 0.1177 0.4912 0.6065];
y_test = damped_cos(0.5, 1, 10);
assert( all ( abs(y_correct(:) - y_test(:)) < 1e-4 ) )
t =
0
0.1111
0.2222
0.3333
0.4444
0.5556
0.6667
0.7778
0.8889
1.0000
A =
1 1 1 1 1 1 1 1 1 1
f =
1 1 1 1 1 1 1 1 1 1
y =
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
0.9460 0.9460 0.9460 0.9460 0.9460 0.9460 0.9460 0.9460 0.9460 0.9460
0.8948 0.8948 0.8948 0.8948 0.8948 0.8948 0.8948 0.8948 0.8948 0.8948
0.8465 0.8465 0.8465 0.8465 0.8465 0.8465 0.8465 0.8465 0.8465 0.8465
0.8007 0.8007 0.8007 0.8007 0.8007 0.8007 0.8007 0.8007 0.8007 0.8007
0.7575 0.7575 0.7575 0.7575 0.7575 0.7575 0.7575 0.7575 0.7575 0.7575
0.7165 0.7165 0.7165 0.7165 0.7165 0.7165 0.7165 0.7165 0.7165 0.7165
0.6778 0.6778 0.6778 0.6778 0.6778 0.6778 0.6778 0.6778 0.6778 0.6778
0.6412 0.6412 0.6412 0.6412 0.6412 0.6412 0.6412 0.6412 0.6412 0.6412
0.6065 0.6065 0.6065 0.6065 0.6065 0.6065 0.6065 0.6065 0.6065 0.6065
|
2 | Fail |
y_correct = [1.0000 -3.4903 12.1825];
y_test = damped_cos(-0.5, 5, 3)
assert( all ( abs(y_correct(:) - y_test(:)) < 1e-4 ) )
t =
0
2.5000
5.0000
A =
1 1 1
f =
1 1 1
y =
1.0000 1.0000 1.0000
3.4903 3.4903 3.4903
12.1825 12.1825 12.1825
y_test =
1.0000 1.0000 1.0000
3.4903 3.4903 3.4903
12.1825 12.1825 12.1825
|
732 Solvers
The Hitchhiker's Guide to MATLAB
2874 Solvers
middleAsColumn: Return all but first and last element as a column vector
387 Solvers
Determine the number of odd integers in a vector
435 Solvers
2455 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!