>> x = rand(1) 0.08847010159 >> y = rand(2) 0.346 0.53 >> sin Builtin function >> f = x -> sqrt(1+x^2) user defined functionTo suppress unwanted display of answers, a semicolon should be appended at the end of the statement.
The built-in function print will display the value of its operand, even if the line that contains print ends with a semicolon. The print function takes one argument, and display its value, but does not return anything. For example
>> print(cos); Builtin function
How values are displayed by print function is defined by the system, and cannot be modified. To display data in customized ways, the formatted output function printf and sprintf can be used.