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 script to solve

Math 1371 Projects, Xiaoyan Hu, MGA
Project 2: Chapter 3 Sec 3.3I
Write a 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_2

Step: 3

blur-text-image_3

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

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions