turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- SOLVE Ax=u

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-11-2014 10:01 PM

Dear all,

I want to solve A**x**=**b** for A. i.e.** x and b are known vectors** A is unknown matrix. Please can anybody let me know how to find the matrix A by proc iml..

Thank you in advanced.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to wbrian

03-12-2014 10:29 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to wbrian

03-12-2014 11:14 AM

Did you mis-state the problem? Usually A and b are known and you need to find x.

As you've stated it, the problem has infinitely many solutions when x is not identically zero.

Since x is not all zeros, there is some element x_i which is nonzero. Construct the matrix A that is zero everywhere except for the i_th column, where it has the value b/x_i.

For example:

proc iml;

x = T(4:0);

b = T(1:3);

i=1; /* for this problem x[1] is nonzero */

A = j(nrow(b), nrow(x), 0);

A[,i] = b/x*;*

diff = A*x-b; /* compute A*x - b */

print diff;