Question: Question 2 Create a Matlab Live Script called Delete_Row.mlxcontaining a local function remove_row that accepts an [n x 3] matrix A as input and outputs

Question 2 Create a Matlab Live Script called "Delete_Row.mlx"containing a local function remove_row that accepts an [n x 3] matrix A as input and outputs a vector u and the modified matrix A. The function needs to do the following: 1. Check whether A has the right number of columns and print an error otherwise (Hint: use the error and return functions). 2. Extract the last row of A and assign it to u. 3. Return the matrix A after deleting the last row. Use the Live Script to call such function, using an [8 x 3] matrix composed of random numbers between 0 and 1 (Hint: use rand function). Also, show that by calling the function with a [4 x 4] matrix provides an error as intended
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
