- This error may occur due to the input vector not being given as an input argument during function call. One possible solution is to use the following syntax and execute the function from the MATLAB command line using the following syntax
- Yet another solution may be to accept the user input within the function and to return the sum as follows: