Question: Write exactly one assignment statement to create each of the following vectors or matrices. You may only make use of the built-in MATLAB functions ones,

Write exactly one assignment statement to create each of the following vectors or matrices.

You may only make use of the built-in MATLAB functions ones, zeros, eye, and diag as well as MATLAB operators (such as *, +, :, or ' ). You may not give the vector or matrix explicitly (or use loops). For example, to create

xx = 1 2 3 4 5 6 1 2 3 4 

The code xx = [ 1 : 6, 1 : 4 ] is acceptable; the code xx = [1, 2, 3, 4, 5, 6, 1, 2, 3, 4] is not.

1. vector1 = 0 -1 -4 -9 -16 -25 -36 -49 
2. vector2 = 19 17 15 13 11 9 7 10 13 16 19 
3. vector3 = 0 0 0 0 0 0 5 

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!