(a) Start up MATLAB. In thecommand window type x = -1:0.1:1 and then execute each of the following statements by typing them in and pressing return:

sqrt(x)                     cos(x)

sin(x)                       2./x

x.\ 3                        plot(x, sin(x.^3))

plot(x, cos(x.^4))

Examine the effects of each statement carefully.

(b) Execute the following and explain the results:

x = [2 3 4 5]

y = -1:1:2

x.^y

x.*y

x./y

(a) Set up the matrix A = [1 5 8;84 81 7;12 34 71] in the command window and examine the contents of A(1,1), A(2,1), A(1,2), A(3,3), A(1:2,:), A(:,1), A(3,:), and A(:,2:3). (b) What do the following MATLAB statements produce?

x = 1:1:10

z = rand(10)

y = [z;x]

c = rand(4)

e = [c eye(size(c)); eye(size(c)) ones(size(c))]

d = sqrt(c)

t1 = d *d

t2 = d. *d

 

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!