using Matlab solve for the following questions Using the col

using Matlab solve for the following questions

Using the colon operator, create a row vector p1a containing even integer numbers from 1900 to 2016. Using function linspace, create a row vector p1b containing odd integer numbers between 1900 and 2016. Concatenate the vectors created in parts (a) and (b) and put the answer in vector p1c. What is the length of the vector in part (c) ? Put the answer to p1d. Add the number 2017 to the end of the vector in part (c) to create vector p1e. Write an expression that would store the first half of the vector in part (e) in vector p1f. Write an expression that would store the second half of the vector in part (e) in vector P1g Problem 2: Create a column vector p2a with all integers starting from 10 decreasing to -10 by entering all of elements. Create a column vector p2b with all integers starting from 10 decreasing to -10 using function linspace. Create a column vector p2c with all integers starting from 10 decreasing to -10 using the colon operator. Create a column vector p2d with all numbers that are between 1 and 100 and divisible by either 3 or 4. The numbers in the vector should be listed in increasing order. Square all of the elements of the vector in part (d) and put the answer in p2e. Sum all elements of the vector in part (e) and put the answer in p2f. Find the product of the last eight elements of the vector in part (e) and put the answer in p2g. Find the cumulative sum of the vector in part (e). Put the answer in p2h.

Solution

PROBLEM 1:

a)

b)

c)

d)

e)

f)

g)

PROBLEM 2 :

a)

b)

c)

d)

e)

f)

g)

h)

using Matlab solve for the following questions Using the colon operator, create a row vector p1a containing even integer numbers from 1900 to 2016. Using functi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site