Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 31st International Conference Dexa 2020 Bratislava Slovakia September 14 17 2020 Proceedings Part 1 Lncs 12391

Authors: Sven Hartmann ,Josef Kung ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

303059002X, 978-3030590024

More Books

Students also viewed these Databases questions

Question

Consistently develop management talent.

Answered: 1 week ago

Question

Create a refreshed and common vision and values across Europe.

Answered: 1 week ago

Question

Provide the best employee relations environment.

Answered: 1 week ago