Commit 5a7c54e8 authored by Diana HENDRICKX's avatar Diana HENDRICKX
Browse files

adding function sqrt

parent 45eb109f
function y = sqrt_diana(x)
y = sqrt(x)
endfunction
% Test file
c = addTwoNumbers_myName(1, 2)
% c = addTwoNumbers_diana(1, 2)
% test if the addition function works as expected
assert(c == 3)
% assert(c == 3)
% d = multiplyTwoNumbers_myName(c, c)
% d = multiplyTwoNumbers_diana(c, c)
% test if the multiplication function works as expected
% assert(d == 9)
% Test for the homework
% test my sqrt function
% assert(sqrt_myName(d) == sqrt(d))
assert(sqrt_diana(d) == sqrt(d))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment