Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: linear algebra, regression problem
Replies: 7   Last Post: Sep 23, 2012 8:34 AM

 Messages: [ Previous | Next ]
 grega Posts: 58 Registered: 10/29/07
Re: linear algebra, regression problem
Posted: Sep 23, 2012 7:44 AM

Thank you, it works neatly!

I wonder if the code can be generalized for any similar MIMO system. What I am concerned with is the following part that I do not understand well:
--------------------------------------------------------
% Constraint matrix C*z = d
nc = 2;
C = zeros(nc,m*n);
C(1,sub2ind([n m],2,1)) = 1; % force A(1,2) = 0
C(2,sub2ind([n m],[1 1],[1 3])) = [1 -1]; % force A(1,1)=A(3,1)
d = zeros(nc,1);
----------------------------------------------------------
What is nc = 2 related to?
Why [1 -1] in C(2,sub2ind([n m],[1 1],[1 3])) = [1 -1];

Thanks once more!!

Date Subject Author
9/21/12 grega
9/23/12 grega
9/23/12 Bruno Luong
9/23/12 grega
9/23/12 Bruno Luong
9/23/12 Bruno Luong
9/23/12 grega
9/23/12 Bruno Luong