Question: using matlab 2.5 Write a script to solve the following problem using only vector operations Assume you have two vectors named Al and B of
using matlab

2.5 Write a script to solve the following problem using only vector operations Assume you have two vectors named Al and B of equal length and create a vector C1 that CI = [A1(1)-Bi(1) Al(1)-B1(1) A1(2)-Bi(2) A1(2)-BI(2) . . . . A1(end)-Bi(end) (a) Type A1 = [2, 4, 8, 101 and B-3, 9, 27, 21]. Generate Cl to be [5,-1, 13,-5, 35,-19, 31, (b) Use the "input" function to allow a user to type any Al and B1. Create the script file named combines Al and B1 such that A1(end)-B1(end 09 "hw2.m and run this script file. Then, try the following example. Show the script file and the input and output. AI = [-2-4,-8,-10,-12] and BI = [3, 9, 27, 21, 231
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
