ABSTRACT
Performing simple computations is virtually identical in both packages. Commands like y = sqrt(7)
and x = sin(y)
will work in both R
and MATLAB, although what you see on your screen after doing them differs between the two platforms. One difference is that in MATLAB, parentheses are optional when calling a function which needs no arguments. That is, you can enter date
(which returns the current date) in MATLAB instead of date()
if you like. In R, you must enter date()
to call the analagous function.