Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i kinda got how to do part a,b,c someone help me with d,e,f thank you ASAP ! Matrices and vectors make up the heart of

image text in transcribedimage text in transcribed

i kinda got how to do part a,b,c someone help me with d,e,f thank you ASAP !

Matrices and vectors make up the heart of MATLAB computations. A vector v that contains the numbers between a and b that are d apart is created using the command: v-a:d:b (a) Create a vector x containing the numbers in the range [0,3.98]. Use increments of 0.02. Plot x using the command plot(x) NOTE: Type help plot for more information about plotting vectors. To create an all-zero or all-one vector you can use the zeros or ones commands, respec ones (1,100); tively. Type help zeros or help ones for more information. For example, by typing you create a vector containing 100 elements equal to 1 (b) Create and plot a vector y containing 1/4 of the number of elements of vector x (if needed, round up the number of elements to the closer lower integer). All the elements of y should be equal to 0. NOTE: You can check the length of x using the command length. Type help length for more information. NOTE: You can round up to the closer lower or larger integer using the commands floor or ceil, respectively. Type help floor or help ceil for more information. (c) Create and plot an all-one vector z with the same length as y Two vectors v1 and v2 can be concatenated by typing [v1, v2]; (d) Concatenate the three vectors y, x and z (in that order). Store the result in vector s and plot s The command fliplr flips a vector (see the following picture) original vector flipped vector (e) Flip vector s and plot the result You can access specific elements of a vector v by typing v(r) where r is a vector containing the indices of the elements you wish to access. For example, with the commands r-1:2:length) vodd-v(r); we store in vodd the odd-numbered elements of v. (f) Plot the last third of the vector created in Section 1-(e)

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

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions