Please use the programming language MATLAB.
2. (12 pts) Write a function createnum that will return a real number (r) and a character vector (v). If no arguments are passed to the function, it will return 0 for r and None for v. If one argument is passed to the function, it will return the square of the value of the argument for r and 'Square' for v. If two arguments are passed, it will return the product of the two arguments for r and return 'Product' for v. If three arguments are passed, it will return the sum of the three arguments for r and return 'Sum' for v. If more than three parameters are passed, it will return the sum of the first and last arguments, and return 'Others' for v. For example, we call the function: [r,v] = createnum(2,3,4) and it returns r = 9 and v = 'Sum'. [r,v] = createnum(2,5,4,6,8,1) and it returns r = 3 and v = 'Others'.