Question: Math 1 3 7 1 Projects, Xiaoyan Hu , MGA Project 2 : Chapter 3 Sec 3 . 3 I Write a MATLAB script to

Math 1371 Projects, Xiaoyan Hu, MGA
Project 2: Chapter 3 Sec 3.3I
Write a MATLAB script to solve the following problems using vector operations.
(Part I) Assume that you have three vectors
A=[a1,cdots,an],B=[b1,cdots,bn],C=[c1,cdots,cn]
of equal length, and create a vector D that combines A,B and C such that
D=[a1,b1,a2,b2,cdots,an,bn,c1,cdots,cn]
Requirement: You ccould choose any A and B in this example for your program. But your program should work if we ONLY change A and B to any other vectors of the same length.
For example, if A=[2,4,8],B=[-2,-9,-27],C=[1,1,1], then
D=[2,-3,4,-9,8,-27,1,1,1]
For example, if A=[1,2,3],B=[-1,-2,-3],C=[5,6,7] then
D=[1,-1,2,-2,3,-3,5,6,7]
Hint: you are not required to follow the steps below. You could choose any way that works.
Step 1: %define A and B
Step 2: %create a zero matrix E with the length twice of length (A)
Step 3: % change all elements of E on the odd positions
Step 4: % change all elements of E on the even positions
Step 4: % concatenate E and C to create D.
 Math 1371 Projects, Xiaoyan Hu, MGA Project 2: Chapter 3 Sec

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!