What is the max and minimum value of the given vector

Assignment Help MATLAB Programming
Reference no: EM131195758

Introduction to Programming in MATLAB

1. Working with MATLAB scalars, vectors, and complex numbers.

Using MATLAB, define a unique variable for the following quantities.

a. 5 (ex. Define x = 5, etc.)
b. 252
c. (3 + 4??) + 82
d. √(36 + 72)
e. ??(72/5 + 6.54)
f. the area of a circle of radius 11.21
g. the circumference of the same circle in (f)
h. the area of a square with side length 7.81
i. the side length of a cube of volume 107.81.
j. the magnitude of the vector in (c) (hint: look into real(), imag() or abs())

2. Using built-in functions to manipulate MATLAB variables.

a. define the following vector: (problems a - f)
?? = < √15, 13,34,72, √54, 89.2,0.541,??7/8, 10, log10 34.2 >

b. What is the max and minimum value of the above vector? In what elements are these values found?

c. Find the square root, cube root and 7th root of this vector using a single operation.

d. What is the length of the vector? How many elements does it have? (you must use MATLAB to determine/prove this)

e. Replace the max value of the vector with a value 8.1x its size without redefining the entire vector. Do the same with the minimum value.

f. Create a new, unique, vector containing the 3rd, 7th and last values of the vector in (a).

g. Define a vector from 0 to 10 with 100 equally spaced entries (hint: look at linspace)

h. Define a vector ranging from 110 to 120 with a step size of 0.1. What is the length of the resulting vector?

i. Evaluate the trigonometric functions sin and cos from 0 to 2π radians in steps of 0.1.

j. Consider the following vector:

< 1, ??, ??2/2!, ??3/3!, ??4/4!, ??5/5!, ??6/6!, ??7/7!, ??8/8!>

define this vector in matlab for a user-selected value of x. Find a MATLAB function that will sum the entries of this vector together. Compare your answer to MATLAB's exp(x) for the same value of x. Are your answers reasonably close?

What does the built-in function you found appear to do?

k. define a random 100 x 1 vector (be sure to suppress the output). What are the mean, median and mode? (hint: use rand(m,n)).

3. Understanding MATLAB matrices.

a. define the following matrices in MATLAB: (problems a - g)

1070_Matrix.jpg

?? = [6, 17, 8]

b. what are the eigenvalues of A (hint: eig())? What is the determinant of A? (find a MATLAB function that can do this for you) What is A-1?

c. Replace the max and min values of A with the values of a11 and a12, respectively.

d. Create a new matrix from the last two rows of A and the vector B withoutn redefining the system.

e. what is the sum of the first row of A? First column of A?

f. How many elements are in A? B? (must use MATLAB to prove result) Multiply each element in A by 7.2 and each element in B by 2. Find a way to multiply matrices A and B. What must you do? How did you accomplish this?

g. Flip the vector B from right to left. Transpose the matrix into a column vector and flip it once again from up to down.

h. define a random 6x6 matrix, a 3x3 matrix of zeros, 3x3 matrix of ones and the 4x4 identity matrix. (hint: use built-in MATLAB functions). Find a way to combine the random 6x6 matrix, the matrix of ones and the matrix of zeros into a single, 6x9 matrix. (hint: this will likely be a 2 step process).

i. create (another) random 8x8 matrix (be sure to suppress the output). Find a way to define two separate, smaller, 4x4 matrices composed of the values from the "top left" and "bottom right" sub-matrices of the larger, 8x8.

j. Consider the vectors <3,7,1> and <5,2,0>. Find the unit vector of each, a vector normal to both, and the dot product of the two. (hint: look for built-in functions).

Reference no: EM131195758

Questions Cloud

Analyse how seasonality can affect capacity decisions : Analyse how this seasonality can affect capacity decisions.- Describe a case where demand seasonality is evident and strongly disturbs the smooth operation of your selected organisation.
What are the length width and height of the prism : What are the length, width, and height of the prism if the volume is 3x3+ 9x2 + 6x? Your answer will not have exact numeric dimensions but rather three algebraic terms that represent them.
Assistance in locating and hiring an outstanding : You have been hired as a staffing consultant by the administration of Sincere College. They need your assistance in locating and hiring an outstanding young scholar to join the faculty of the Davis School of Business
How would you decide between the two vendors’ products : The two products are very evenly matched on other key factors, such as performance, features, reliability, and support costs. How would you decide between the two vendors' products?
What is the max and minimum value of the given vector : What is the max and minimum value of the above vector? In what elements are these values found? Find the square root, cube root and 7th root of this vector using a single operation.
Is short amount of time she has to live ethically relevant : Is the short amount of time she has to live ethically relevant? Is there an ethical difference between her dying in 6 hours and dying in a week? What about a year, and how do you draw this distinction?
What whistle-blower actions did dr. wigand take : What motivated Wigand to take an executive position at a tobacco company and then five years later to denounce the industry's efforts to minimize the health and safety issues of tobacco use?
Suitability of the zone transformer impedance : Confirm the suitability of the zone transformer impedance, and zone transformer neutral earthing impedance and The zone substation transformer overcurrent and earth fault relay settings on HV.
How would you decide between the two vendors'' products : The two products are very evenly matched on other key factors, such as performance, features, reliability, and support costs. How would you decide between the two vendors' products?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Compute the power spectral density vector

Compute the power spectral density vector. Plot the spectrogram using the same parameters as in lecture.

  Plot the pressure surface versus latitude and longitude

Plot the pressure surface versus latitude and longitude as a surface plot

  Plot the open loop displacement response of the

a farm equipment manufacturer has a need to actively reduce the vibration of the operators seat using an electrodynamic

  Use matalb to plot the computed eigenvector

Write a Matlab code implementing the inverse power method to compute approximations of the smallest eigenvalue λ1 = π2 of L and corresponding eigenfunctions. Use matalb to plot the computed eigenvector

  Compute orientation of the principal axes of cross section

Compute the orientation of the principal axes of the cross section using the eigen- value solver in MATLAB (eig) on the moment of inertia matrix J. See the CP Notes for more information on this task.

  What is the uniform background lifetime

You should find that the calculated lifetime is much more spatially uniform than the noisy intensity data, with a single well-defined region of spatial contrast. What is the uniform background lifetime, in nanoseconds, and what is the lifetime in ..

  Perform linear regression on penicillin clearance

Perform linear regression on penicillin clearance using the normal equations - plot the concentration data and re-plot the log of the concentration data to show that it appears linear.

  Symmetry in the rod

matlab programming

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Matlab has a built-in ability to perform mathematical

MATLAB has a built-in ability to perform mathematical operations on complex numbers. However, there are times when it is useful to treat complex numbers as a structure. Write a set of functions with the following capability and a script to verify ..

  Non-linear interpolation using polyfit function

Illustrate results of your interpolation by plotting a small piece of data before and after interpolation on the same graph using the "plot" and "hold on" commands. Submit the script and the plot in a single Word file.

  Write a program to display all unit-step responses

Write a program that will read in a text string mixed with numbers and letters from the keyboard and count how many numbers there are in the string

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd