I'm new to MATLAB and I have been asked to write a MATLAB function whose input arguments are two integers $a$ and $b$; the output is the remainder of the integer division $a/b$ if $a>=b$ or of the integer division $b/a$ if $b>a$
Can someone help me out? Thanks.
EDIT:
This is all I can string together at the moment but I know that it is incorrect. I'm just trying to put together what I know.
function r=remainder(n,m);
if n>=m;
r=rem(m,n);
elseif m>n;
r=rem(n,m);
end