Question: Create the following functions using MATLAB write a function called top_right that takes two inputs: a matrix N and a scalar non-negative integer n, in
Create the following functions using MATLAB

write a function called top_right that takes two inputs: a matrix N and a scalar non-negative integer n, in that order, where each dimension of N is greater than or equal to n. The function returns the n-by-n square subarray of N located at the top right corner of N. Write a function called light_speed that takes as input a row vector of distances in kilometers and returns two row vectors of the same length. Each element of the first output argument is the time in minutes that light would take to travel the distance specified by the corresponding element of the input vector. To check your math, it takes a little more than 8 minutes for sunlight to reach Earth which is 150 million kilometers away. The second output contains the input distances converted to miles. Assume that the speed of light is 380,000 km/s and that one mile equals 1.609 km
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
