do ÂściÂągnięcia ^ pdf ^ ebook ^ pobieranie ^ download
Podstrony
- Strona startowa
- Mazurkiewicz Roman Zrozumieć śÂredniowiecze
- JOE ALEX 5.PIEKśÂO JEST WE MNIE
- Beaton M.C. Agatha Raisin 15 Agatha Raisin i zabójczy taniec
- E72 RM 529 RM 530 schematics v1.0
- Anne McCaffrey Doona 2 Crisis On Doona
- Król Fijewska M Trening asertywnośÂci
- Joel Dorman Steele A Brief History of the United States, Fourth Edition (1885)
- Hagen Lynn Wolf120921_0425
- FR 260
- Loius L'Amour The Last of the Breed
- zanotowane.pl
- doc.pisz.pl
- pdf.pisz.pl
- wblaskucienia.xlx.pl
[ Pobierz całość w formacie PDF ]
through m.
43
Hint: You may wish to use function Housprod in the body of the function myqr.
16. Let A be an n-by-3 random matrix generated by the MATLAB function rand. In this
exercise you are to plot the error A - QR versus n for n = 3, 5, & , 25. To
F
compute the QR factorization of A use the function myqr of Problem 15. Plot the graph of the
computed errors using MATLAB's function semilogy instead of the function plot. Repeat this
experiment several times. Does the error increase as n does?
17. Write MATLAB function V = Vandm(t, n) that generates Vandermonde's matrix V
used in the polynomial least-squares fit. The degree of the approximating polynomial
is n while the x-coordinates of the points to be fitted are stored in the vector t.
18. In this exercise you are to compute coefficients of the least squares polynomials using four
methods, namely the normal equations, the QR factorization, modified Gram-Schmidt
orthogonalization and the singular value decomposition.
Write MATLAB function C = lspol(t, y, n) that computes coefficients of the
approximating polynomials. They should be saved in columns of the matrix
(n+1) x 4
C . Here n stands for the degree of the polynomial, t and y are the vectors
holding the x- and the y-coordinates of the points to be approximated, respectively.
Test your function using t = linspace(1.4, 1.8), y = sin(tan(t)) tan(sin(t)), n = 2, 4, 8.
Use format long to display the output to the screen.
Hint: To create the Vandermonde matrix needed in the body of the function lspol you
may wish to use function Vandm of Problem 17.
19. Modify function lspol of Problem 18 adding a second output parameter err so that
the header of the modified function should look like this
function [C, err] = lspol(t, y, n). Parameter err is the least squares error in the computed
solution c to the overdetermined linear system Vc y. Run the modified function on the data
of Problem 18. Which of the methods used seems to produce the least reliable numerical
results? Justify your answer.
20. Write MATLAB function [r, c] = nrceig(A) that computes the number of real and
complex eigenvalues of the real matrix A. You cannot use MATLAB function eig. Run
function nrceig on several random matrices generated by the functions rand and randn.
Hint: You may wish to use the following MATLAB functions schur, diag, find. Note that
the diag function takes a second optional argument.
21. Assume that an eigenvalue of a matrix is sensitive if its condition number is
greater than 103. Construct an n-by-n matrix (5 n 10) whose all eigenvalues are
real and sensitive.
22. Write MATLAB function A = pent(a, b, c, d, e, n) that creates the full form of the
n-by-n pentadiagonal matrix A with constant entries a along the second subdiagonal, constant
entries b along the subdiagonal, etc.
23. Let A = pent(1, 26, 66, 26, 1, n) be an n-by-n symmetric pentadiagonal matrix
generated by function pent of Problem 22. Find the eigenvalue decomposition
A = Q QT of A for various values of n. Repeat this experiment using random numbers in the
band of the matrix A. Based on your observations, what conjecture can be formulated about
the eigenvectors of A?
24. Write MATLAB function [la, x] = smeig(A, v) that computes the smallest
44
(in magnitude) eigenvalue of the nonsingular matrix A and the associated
eigenvector x. The input parameter v is an estimate of the eigenvector of A that is
associated with the largest (in magnitude) eigenvalue of A.
25. In this exercise you are to experiment with the eigenvalues and eigenvectors of the
partitioned matrices. Begin with a square matrix A with known eigenvalues and
eigenvectors. Next construct a matrix B using MATLAB's built-in function repmat
to define the matrix B as B = repmat(A, 2, 2). Solve the matrix eigenvalue
problem for the matrix B and compare the eigenvalues and eigenvectors of matrices
A and B. You may wish to continue in this manner using larger values for the second
and third parameters in the function repmat. Based on the results of your experiment,
what conjecture about the eigenvalues and eigenvectors of B can be formulated?
[ Pobierz całość w formacie PDF ]