Question: function that performs the following operations: 1. Check if the input is a vector. If the input is not a vector, return an error. If
function that performs the following operations: 1. Check if the input is a vector. If the input is not a vector, return an error. If the input is a row vector, transform it into a column vector. Otherwise, do nothing. 2. Compute the norm of the vector: ||u=i=1nui2 Hint: the input of the function is the given vector, and the output is the value of its norm. Use the defined function to compute the norm of the following vectors and compare to the solution obtained by Matlab's built-in norm function. a=(3,9,0,6)b=(0,0,1)c=(3,4)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
