From: "je w" <>
Newsgroups: comp.soft-sys.matlab
Subject: Linear Combination
Date: Wed, 17 Dec 2008 10:31:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <giakd7$ri2$>
Reply-To: "je w" <>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1229509863 28226 (17 Dec 2008 10:31:03 GMT)
NNTP-Posting-Date: Wed, 17 Dec 2008 10:31:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1643636
Xref: comp.soft-sys.matlab:507475

Anyone knows how to write a matlab code for linear combination?

Question: a=[43 50 86 93 129]. the linear combination between the elements of a can be expressed by using:
i) simple multiple of preceeding elements; e.g. a(3)=2a(1) 
ii) a multiple of a difference between two preceeding elements, added to a multiple of another preceeding elements; e.g. a(4)=[a(2)-a(1)]+2a(1)

The output of linear combination of the above matrix a should be:

a(2) has no linear combination;



a(5)=3a(1)and a(5)= [a(3)-a(1)]+2a(1)

note there can be more than one linear combination for each element.

Thank you sooooooooo much!:-)