Question

(MATLAB): Suppose that you are given a positive definite symmetric matrix A, a vector b, and a real number c. Write MATLAB co

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Script:

close all
clear
clc

A = eye(2); b = 0; c = 0;
r = [0 1]; n = 2;
fmin = findfmin(A,b,c,r,n)

function fmin = findfmin(A,b,c,r,n)
fun = @(x) x'*A*x + b' + c;
x0 = ones(size(A,2), 1); % Initial guess
r = r(:);
Aeq = r'; beq = n; % Equality contraints
[~,fmin] = fmincon(fun, x0, [], [], Aeq, beq); % Contrained minimizer
end

Sample Output:

fmin =
4

Add a comment
Know the answer?
Add Answer to:
(MATLAB): Suppose that you are given a positive definite symmetric matrix A, a vector b, and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2a. Given a linear system of equations A b with a symmetric positive definite matrix A ERIX4 whic...

    2a. Given a linear system of equations A b with a symmetric positive definite matrix A ERIX4 which has eigenvalues 1, 1/4, 1/9,1/16. Consider the iterative method defined by r(k +1) = r(k)-w(Ax(k)-b). Can you choose w such that method is convergent? If so, what is the best possible w? 2b. Discuss the convergence of the Jacobi method for Ar-b with the tridiagonal matrix -1 3 Does the Jacobi method converge for this matrix? What is the convergence rate 2a....

  • 2. Suppose that is symmetric, positive definite and A is the lower triangular matrix given by...

    2. Suppose that is symmetric, positive definite and A is the lower triangular matrix given by the Cholesky factorization. Prove that, if X N (0,) then Y = AXN (E).

  • (a) Let S be a symmetric positive definite matrix and define a function | on R" by 1/2 xx Sx . Pr...

    (a) Let S be a symmetric positive definite matrix and define a function | on R" by 1/2 xx Sx . Prove that this function defines a vector norm. Hint: Use the Cholesky decomposition. (b) Find an example of square matrices A an This shows that ρ(A) is not a norm. Note: there are very simple examples. d B such that ρ(A+B)>ρ(A) + ρ(8) (a) Let S be a symmetric positive definite matrix and define a function | on R"...

  • A real symmetric matrix B e Rnxn (i.e. BT = B) is said to be positive...

    A real symmetric matrix B e Rnxn (i.e. BT = B) is said to be positive definite if all of its eigenvalues 11, 12, ..., In are positive. (Recall that is an eigenvalue of B if and only if there exits a nonzero vector t such that Bt = it). Show that B-1 is also positive definite. That is, you need to show that all the eigenvalues of B-1 are also positive. (Hint: consider equation Bt; = liti for all...

  • (f) Let A be symmetric square matrix of order n. Show that there exists an orthogonal matrix P su...

    (f) Let A be symmetric square matrix of order n. Show that there exists an orthogonal matrix P such that PT AP is a diagonal matrix Hint : UseLO and Problem EK〗 (g) Let A be a square matrix and Rn × Rn → Rn is defined by: UCTION E AND MES FOR THE la(x, y) = хтАУ (i) Show that I is symmetric, ie, 14(x,y) = 1a(y, x), if a d Only if. A is symmetric (ii) Show that...

  • Problem 8: (11 total points) Suppose that B is a nx n matrix of the form...

    Problem 8: (11 total points) Suppose that B is a nx n matrix of the form B = Viv] + v2v + V3v3, where V1, V2, V3 € R”, n > 3 are nonzero column vector and are orthogonal. a) Show that B is a positive semidefinite matrix. b) Under which condition, B will be a positive definite matrix? c) Let A be 3x3 real symmetric matrix with eigenvalues 11 > 12 > 13. Let F be a positive definite...

  • For the following two problems, use the built-in simple MATLAB matrix algebra rules, i.e. if you're...

    For the following two problems, use the built-in simple MATLAB matrix algebra rules, i.e. if you're multiplying a matrix L by a vector xi, it's just L*xi. You do not have to code matrix multiplication in for loops. Code up the Jacobi Method and use it to solve the large matrix of problem 3 from HW5. Return the iteration count to solve this problem and a plot of the solution. Modify the Jacobi method to use the most current information...

  • matlab Problem 6: The Matlab command 'randn(m,n) produces an m x n matrix of random numbers...

    matlab Problem 6: The Matlab command 'randn(m,n) produces an m x n matrix of random numbers that are a realization of a white random process with some probability density function. Moreover, the Matlab command 'rand(m,n)' produces an mxn matrix of random numbers between 0 and 1 that are a realization of a white random process with some probability density function. a) Use Matlab to do the following steps: 1) Let u-randn (10000,1); and plot u. 2) Use the command 'mean(u)'...

  • Matrix operations 22. Suppose you are given a matrix of the form cos(() - sin(0) R(0)...

    Matrix operations 22. Suppose you are given a matrix of the form cos(() - sin(0) R(0) = sin() cos(0) Consider now the unit vector v = [1,0)" in a two dimensional plane. Compute R(O)v. Repeat your computations this time using w = [0, 1]". What do you observe? Try thinking in terms of pictures, look at the pair of vectors before and after the action of R(O). 23. You may have recognised the two vectors in the previous question to...

  • Can you help me with this question please? For the code, please do it on MATLAB. Thanks

    Can you help me with this question please? For the code, please do it on MATLAB. Thanks 7. Bonus [3+3+4pts] Before answering this question, read the Google page rank article on Pi- azza in the 'General Resources' section. The Google page rank algorithm has a lot to do with the eigenvector corresponding to the largest eigenvalue of a so-called stochastic matrix, which describes the links between websites.2 Stochastic matrices have non-negative entries and each column sums to1, and one can...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT