CN – Examples (Solution)

$ 24.99
Category:

Description

Matlab documentation:
http://www.mathworks.com/help/pdf_doc/matlab/getstart.pdf help help followed by a command name doc followed by a command name (e.g., help plot, doc plot)
Mathematical Moments (http://www.ams.org/publicoutreach/mathmoments/browsemoments?cat=all):
a series of posters that promote the role Mathematics plays in science, natureand technology.
I. Check the following operations with vectors: a = [1 2 3] or a = [1;2;3] %line vector
b = [4;5;6] or b = [4 5 6]0 %column vector c = a b
d = [4 5 6] or d = b0 %the transpose vector of b e = a: d
f = a:^2 g = a:^d v = 1 : 6
w = 2 : 3 : 10 %the starting point:step:the nal point
y = 10 : 1 : 0
exp(a)
exp(1) %number e
sqrt(a)
m = max(a) [m;k] = max(a) h = [ 2 9 8] k = abs(h) mean(a) geomean(a) sum(a) prod(a)
II. Consider the matrices and : Check
the following operations: [m;n] = size(a) t = b0 %the transpose matrix of b c = a b d = a: b
e = a:^2
size(a) length(a)
m = mean(a) m1 = mean(a;2) g = geomean(a) s = sum(a) s1 = sum(a;2) p = prod(a) p1 = prod(a;2) max(a) min(a) diag(a)
m > 2 a > b
inv(b)
det(b)
f = abs(b)
b = [16 15 24]0 x = anb triu(a)
tril(a)
m = [2 3 5;7 11 13;17 19 23] m(2;1) m(:;1) %all rows of column 1 m(2;:) % all columns of line 2 m(2;1 : 2) %line 2, all but last columns m(2;2 : end) %second row, all but rst column
m(2 : 3;2 : 3) %a submatrix
Some particular matrices: a) eye(8); eye(5;7); zeros(5;7); ones(7;9) b) M = magic(4)
sum(M); sum(M;2);sum(diag(M));sum(diag(fliplr(M)))
II. Polynomials
1. Evaluate the polynomial p(x) = 2×3 5×2 + 8 in x = 2: (Use: polyval):
2. Find the roots of the polynomial p(x) = x3 5×2 17x+21: (Use: roots):
III. Graphs
1. Plot the functions f : [0;1] ! R; f(x) = e10x(x 1) sin12x;

and f : [0;1] ! R; f(x) = e5x2 1p3cos12x:
2. Plot the epicycloid
for given a;b:
3. Plot, on a single graph, the functions: f1;f2;f3 : [0;2 ] ! R; f1(x) = cosx; f2(x) = sinx; f3(x) = cos2x:
4. For x 2 f0;1;:::;50g plot the function
if x = even if x = odd:
5. Compute
:
:

Reviews

There are no reviews yet.

Be the first to review “CN – Examples (Solution)”

Your email address will not be published. Required fields are marked *