Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
grega

Posts: 42
Registered: 10/29/07
Re: linear algebra, regression problem
Posted: Sep 23, 2012 7:44 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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!!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.