Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
filetext = fileread('COS.m');
assert(isempty(strfind(filetext, 'cos')),'cos() forbidden')
|
2 | Pass |
x = 0;
y_correct = 1;
assert(abs(COS(x)-y_correct)<0.01)
|
3 | Pass |
x = pi/2;
y_correct = 0;
assert(abs(COS(x)-y_correct)<0.01)
|
4 | Pass |
x = pi;
y_correct = -1;
assert(abs(COS(x)-y_correct)<0.01)
|
5 | Pass |
x = 3*pi/2;
y_correct = 0;
assert(abs(COS(x)-y_correct)<0.01)
|
How to find the position of an element in a vector without using the find function
2477 Solvers
Celsius to Fahrenheit converter
389 Solvers
Matlab Basics - Pick out parts of a vector
198 Solvers
Finding perimeter of a rectangle
278 Solvers
2773 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!