Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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, 231Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started