Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

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).

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M91951821

Have any Question?


Related Questions in MATLAB

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

Lab assignment - matlab matrix relationallogical operators

Lab Assignment - MATLAB Matrix, Relational/Logical Operators and Plotting This laboratory exercise/assignment will involve you 1) practicing multiplication operators in MATLAB; 2) practicing relational and logical operat ...

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Prepare a 3 - 10 pages long reportprepare a presentation

Prepare a 3 - 10 pages long report Prepare a presentation with 5 - 9 slides. The slides will include introduction (need and similar work), theoretical background (tested neural networks), Data, Results (Comparison of the ...

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignmentq1 find the laplace transforms of the following

Assignment Q.1 Find the Laplace transforms of the following functions: (a) t 2 + at + b and (b) sin(2nΠt/T) Q.2 Find f (t) for the following F(s) = α[ f (t)]. (i) 5/(s + 3), (ii) 1/s 2 + 25, (iii) 1/s(s+1) Q.3 Find the L ...

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As