I am not getting the error in my code.Though,its working in MATLAB script.please help
Anyone who has solved the problem, please help.I have developed the code according to the details and it's working well in matlab. I dont know why it is incorrect here.
Did you check the online and offline MATLAB's version?
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 ) )
y =
0.8090 0.3090 -0.3090 -0.8090 -1.0000 -0.8090 -0.3090 0.3090 0.8090 1.0000
|
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 ) )
y =
0.8090 0.1045 -0.9135
y_test =
0.8090 0.1045 -0.9135
|
376 Solvers
257 Solvers
462 Solvers
344 Solvers
1815 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!