Question: PYTHON Write a function that accepts a matrix A and vector b and solves the following problem. minimize ||Ax-b|| 2 subject to ||x|| 1 =1

PYTHON

Write a function that accepts a matrix A and vector b and solves the following problem.

minimize ||Ax-b||2

subject to ||x||1 =1

x=>0

To test the function, use PYTHON Write a function that accepts a matrix A and vector b and and solves the following problem. minimize ||Ax-b||2 subject to ||x||1 =1 x=>0 The minimizer is approximately x=[0,1,0,0] with objective value 5.099. Hint: norm() is a convex function, so a different way is needed to take the 1-norm.

A= A 1 2 1 1 0 3 -2 -1 b 7 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!