0% found this document useful (0 votes)
67 views

Matlab Basics: Exercise 1:), LN (,), 0 Arcsin, 2 / Tan, 4 / Cos, 3 / Sin (

This document provides instructions for 13 exercises using basic Matlab functions and operations. The exercises include: 1) calculating expressions and evaluating built-in functions; 2) creating vectors in different ways; 3) creating and manipulating matrices; 4) generating equally spaced points in a range and creating tables with trigonometric functions evaluated over those points.

Uploaded by

yared4
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Matlab Basics: Exercise 1:), LN (,), 0 Arcsin, 2 / Tan, 4 / Cos, 3 / Sin (

This document provides instructions for 13 exercises using basic Matlab functions and operations. The exercises include: 1) calculating expressions and evaluating built-in functions; 2) creating vectors in different ways; 3) creating and manipulating matrices; 4) generating equally spaced points in a range and creating tables with trigonometric functions evaluated over those points.

Uploaded by

yared4
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Matlab Basics: Exercise 1

1.) Set x = 4, y = 12, z = -2 and find the following


(a) y/x*z
(b) y/(x*z)
Are these different? Why or why not?
2.) Find the square root of x, y, and z above using the built in matlab function.
Print you answer in format long and then again in format short e.
3.) Evaluate the following using matlab:
sin( / 3), cos( / 4), tan( / 2), arcsin(0), z , ln( x ), e y

Anything interesting happen?


4.) Create the following row vector a [1,2,3,4,5,6] two different ways.
5.) Make a column vector b that is the transpose of a two different ways.
6.) Create a vector c that is the same as a but whose second component is the last
component of b.
1
2
7.) Create a 4x4 array A
0

1
1
0
1

1
0
0
1

1
1
.
1

8.) What is A?
9.) Set a column vector d equal to the first row of A using : notation and set a vector
e equal to the first row of A using the column notation.

10.) Create a vector, u, of 15 equally spaced points between


and
2

11.) Make a table whose first column is u, and the second and third columns are
sin(u ), cos(u ) .
12.) Swap the first and second column of your table using the : notation
13.) Create a vector v column vector that is the same as the 4-12 rows of the third
column in your table.

You might also like