Question: [u(x) Create a MATLAB function named my_summation to evaluate this equation. The first input will be a row vector of a list of values (x)
[u(x) Create a MATLAB function named my_summation to evaluate this equation. The first input will be a row vector of a list of values (x) and the second input will be a single integer number (n). The output of the function will be a real number containing the result (y). The nomenclature xk signifies the kth item in the list of x values. Set the return value to -1 if an invalid value for n is entered invalid means less than 1 or greater than the length of the length of x). Remember to end your function with an end statment. Use the following to get started: function y = my_summation(x,n) if nlength(x) y=-1; return; end The rest of your code here end function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
