From: Rune Allnor on
On 24 Sep, 21:54, Andor <andor.bari...(a)gmail.com> wrote:
> On 24 Sep., 15:49, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>
>
>
>
>
> > On 24 Sep, 15:42, Andor <andor.bari...(a)gmail.com> wrote:
>
> > > On 24 Sep., 15:37, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>
> > > > On 24 Sep, 15:04, Andor <andor.bari...(a)gmail.com> wrote:
>
> > > > > As I said, if you calculate 5 more terms in the w that I started
> > > > > below, I will tell you how to calculate w (given v1 and v2) in Matlab
> > > > > with one single command that has only 28 characters (challenge: who
> > > > > can do it in less?).
>
> > > > I can do it with a 1-character command:
>
> > > > %%%%%%%%%% File a.m %%%%%%%%%%%%%
>
> > > > % implement computations here
>
> > > > %%%%%%%%% End of a.m %%%%%%%%%%%%
>
> > > > in which case the one-liner becomes
>
> > > > >> a
>
> > > > But that might not have been what you mean...?
>
> > > Nah, only Matlab and signal processing toolbox functions are
> > > allowed :-)
>
> > Then you'll have to accept my solution above:
> > I don't have the SPT. It would be much more
> > interesting with only basic matlab commands allowed.
>
> Interesting perhaps, but it is much more instructive to use the
> "filter" command.
>
> Consider the problem: given two vectors x and y, find w such that w*x
> = y. The solution is long division of y by x. Now remember that the
> impulse response of a rational transfer function filter is the long
> division of the numerator by the denominator polynomial. So w is
> simply the impulse response of the filter with numerator y and
> denominator x! This will, in general, be an IIR filter, thus w has
> infinite length. The neat Matlab one-liner thus is
>
> w = filter(y,x,[1 zeros(1,n)])
>
> where n is the number of terms you want to compute in w.

Why do you need the SPT for that one?

Apart from that, your approach is sensitive to the usual
questions about poles and stability. If the denomiator
polynomial x has poles on or outside the unit circle your
approach blows up.

Rune
From: Andor on
On 24 Sep., 22:23, Rune Allnor <all...(a)tele.ntnu.no> wrote:
> On 24 Sep, 21:54, Andor <andor.bari...(a)gmail.com> wrote:
>
>
>
>
>
> > On 24 Sep., 15:49, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>
> > > On 24 Sep, 15:42, Andor <andor.bari...(a)gmail.com> wrote:
>
> > > > On 24 Sep., 15:37, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>
> > > > > On 24 Sep, 15:04, Andor <andor.bari...(a)gmail.com> wrote:
>
> > > > > > As I said, if you calculate 5 more terms in the w that I started
> > > > > > below, I will tell you how to calculate w (given v1 and v2) in Matlab
> > > > > > with one single command that has only 28 characters (challenge: who
> > > > > > can do it in less?).
>
> > > > > I can do it with a 1-character command:
>
> > > > > %%%%%%%%%% File a.m %%%%%%%%%%%%%
>
> > > > > % implement computations here
>
> > > > > %%%%%%%%% End of a.m %%%%%%%%%%%%
>
> > > > > in which case the one-liner becomes
>
> > > > > >> a
>
> > > > > But that might not have been what you mean...?
>
> > > > Nah, only Matlab and signal processing toolbox functions are
> > > > allowed :-)
>
> > > Then you'll have to accept my solution above:
> > > I don't have the SPT. It would be much more
> > > interesting with only basic matlab commands allowed.
>
> > Interesting perhaps, but it is much more instructive to use the
> > "filter" command.
>
> > Consider the problem: given two vectors x and y, find w such that w*x
> > = y. The solution is long division of y by x. Now remember that the
> > impulse response of a rational transfer function filter is the long
> > division of the numerator by the denominator polynomial. So w is
> > simply the impulse response of the filter with numerator y and
> > denominator x! This will, in general, be an IIR filter, thus w has
> > infinite length. The neat Matlab one-liner thus is
>
> > w = filter(y,x,[1 zeros(1,n)])
>
> > where n is the number of terms you want to compute in w.
>
> Why do you need the SPT for that one?
>
> Apart from that, your approach is sensitive to the usual
> questions about poles and stability. If the denomiator
> polynomial x has poles on or outside the unit circle your
> approach blows up.

Of course it does. The OPs denominator has all of its poles outside
the unit circle. That doesn't change the fact that this impulse
response w is the one and only solution to the problem of finding w
sucht that w*x = y.
From: sofiyya on
>On 24 Sep., 22:23, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>> On 24 Sep, 21:54, Andor <andor.bari...(a)gmail.com> wrote:
>>
>>
>>
>>
>>
>> > On 24 Sep., 15:49, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>>
>> > > On 24 Sep, 15:42, Andor <andor.bari...(a)gmail.com> wrote:
>>
>> > > > On 24 Sep., 15:37, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>>
>> > > > > On 24 Sep, 15:04, Andor <andor.bari...(a)gmail.com> wrote:
>>
>> > > > > > As I said, if you calculate 5 more terms in the w that I
started
>> > > > > > below, I will tell you how to calculate w (given v1 and v2)
in Matlab
>> > > > > > with one single command that has only 28 characters
(challenge: who
>> > > > > > can do it in less?).
>>
>> > > > > I can do it with a 1-character command:
>>
>> > > > > %%%%%%%%%% File a.m %%%%%%%%%%%%%
>>
>> > > > > % implement computations here
>>
>> > > > > %%%%%%%%% End of a.m %%%%%%%%%%%%
>>
>> > > > > in which case the one-liner becomes
>>
>> > > > > >> a
>>
>> > > > > But that might not have been what you mean...?
>>
>> > > > Nah, only Matlab and signal processing toolbox functions are
>> > > > allowed :-)
>>
>> > > Then you'll have to accept my solution above:
>> > > I don't have the SPT. It would be much more
>> > > interesting with only basic matlab commands allowed.
>>
>> > Interesting perhaps, but it is much more instructive to use the
>> > "filter" command.
>>
>> > Consider the problem: given two vectors x and y, find w such that
w*x
>> > = y. The solution is long division of y by x. Now remember that the
>> > impulse response of a rational transfer function filter is the long
>> > division of the numerator by the denominator polynomial. So w is
>> > simply the impulse response of the filter with numerator y and
>> > denominator x! This will, in general, be an IIR filter, thus w has
>> > infinite length. The neat Matlab one-liner thus is
>>
>> > w = filter(y,x,[1 zeros(1,n)])
>>
>> > where n is the number of terms you want to compute in w.
>>
>> Why do you need the SPT for that one?
>>
>> Apart from that, your approach is sensitive to the usual
>> questions about poles and stability. If the denomiator
>> polynomial x has poles on or outside the unit circle your
>> approach blows up.
>
>Of course it does. The OPs denominator has all of its poles outside
>the unit circle. That doesn't change the fact that this impulse
>response w is the one and only solution to the problem of finding w
>sucht that w*x = y.
>

w = filter(y,x,[1 zeros(1,n)]) is the same as deconv. deconv give the
result with the rest... My question was if we can find w/
conv(w,vect1)=vect2 and eliminate the rest (rest=0)...
From: Andor on
On 25 Sep., 09:58, "sofiyya" <karimae...(a)gmail.com> wrote:
> >On 24 Sep., 22:23, Rune Allnor <all...(a)tele.ntnu.no> wrote:
> >> On 24 Sep, 21:54, Andor <andor.bari...(a)gmail.com> wrote:
>
> >> > On 24 Sep., 15:49, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>
> >> > > On 24 Sep, 15:42, Andor <andor.bari...(a)gmail.com> wrote:
>
> >> > > > On 24 Sep., 15:37, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>
> >> > > > > On 24 Sep, 15:04, Andor <andor.bari...(a)gmail.com> wrote:
>
> >> > > > > > As I said, if you calculate 5 more terms in the w that I
> started
> >> > > > > > below, I will tell you how to calculate w (given v1 and v2)
> in Matlab
> >> > > > > > with one single command that has only 28 characters
> (challenge: who
> >> > > > > > can do it in less?).
>
> >> > > > > I can do it with a 1-character command:
>
> >> > > > > %%%%%%%%%% File a.m %%%%%%%%%%%%%
>
> >> > > > > % implement computations here
>
> >> > > > > %%%%%%%%% End of a.m %%%%%%%%%%%%
>
> >> > > > > in which case the one-liner becomes
>
> >> > > > > >> a
>
> >> > > > > But that might not have been what you mean...?
>
> >> > > > Nah, only Matlab and signal processing toolbox functions are
> >> > > > allowed :-)
>
> >> > > Then you'll have to accept my solution above:
> >> > > I don't have the SPT. It would be much more
> >> > > interesting with only basic matlab commands allowed.
>
> >> > Interesting perhaps, but it is much more instructive to use the
> >> > "filter" command.
>
> >> > Consider the problem: given two vectors x and y, find w such that
> w*x
> >> > = y. The solution is long division of y by x. Now remember that the
> >> > impulse response of a rational transfer function filter is the long
> >> > division of the numerator by the denominator polynomial. So w is
> >> > simply the impulse response of the filter with numerator y and
> >> > denominator x! This will, in general, be an IIR filter, thus w has
> >> > infinite length. The neat Matlab one-liner thus is
>
> >> > w = filter(y,x,[1 zeros(1,n)])
>
> >> > where n is the number of terms you want to compute in w.
>
> >> Why do you need the SPT for that one?
>
> >> Apart from that, your approach is sensitive to the usual
> >> questions about poles and stability. If the denomiator
> >> polynomial x has poles on or outside the unit circle your
> >> approach blows up.
>
> >Of course it does. The OPs denominator has all of its poles outside
> >the unit circle. That doesn't change the fact that this impulse
> >response w is the one and only solution to the problem of finding w
> >sucht that w*x = y.
>
> w = filter(y,x,[1 zeros(1,n)]) is the same as deconv. deconv give the
> result with the rest... My question was if we can find w/
> conv(w,vect1)=vect2 and eliminate the rest (rest=0)...

What do you think: is there a method to divide 3 by 2 such that the
rest = 0?
From: sofiyya on
>On 25 Sep., 09:58, "sofiyya" <karimae...(a)gmail.com> wrote:
>> >On 24 Sep., 22:23, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>> >> On 24 Sep, 21:54, Andor <andor.bari...(a)gmail.com> wrote:
>>
>> >> > On 24 Sep., 15:49, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>>
>> >> > > On 24 Sep, 15:42, Andor <andor.bari...(a)gmail.com> wrote:
>>
>> >> > > > On 24 Sep., 15:37, Rune Allnor <all...(a)tele.ntnu.no> wrote:
>>
>> >> > > > > On 24 Sep, 15:04, Andor <andor.bari...(a)gmail.com> wrote:
>>
>> >> > > > > > As I said, if you calculate 5 more terms in the w that I
>> started
>> >> > > > > > below, I will tell you how to calculate w (given v1 and
v2)
>> in Matlab
>> >> > > > > > with one single command that has only 28 characters
>> (challenge: who
>> >> > > > > > can do it in less?).
>>
>> >> > > > > I can do it with a 1-character command:
>>
>> >> > > > > %%%%%%%%%% File a.m %%%%%%%%%%%%%
>>
>> >> > > > > % implement computations here
>>
>> >> > > > > %%%%%%%%% End of a.m %%%%%%%%%%%%
>>
>> >> > > > > in which case the one-liner becomes
>>
>> >> > > > > >> a
>>
>> >> > > > > But that might not have been what you mean...?
>>
>> >> > > > Nah, only Matlab and signal processing toolbox functions are
>> >> > > > allowed :-)
>>
>> >> > > Then you'll have to accept my solution above:
>> >> > > I don't have the SPT. It would be much more
>> >> > > interesting with only basic matlab commands allowed.
>>
>> >> > Interesting perhaps, but it is much more instructive to use the
>> >> > "filter" command.
>>
>> >> > Consider the problem: given two vectors x and y, find w such that
>> w*x
>> >> > = y. The solution is long division of y by x. Now remember that
the
>> >> > impulse response of a rational transfer function filter is the
long
>> >> > division of the numerator by the denominator polynomial. So w is
>> >> > simply the impulse response of the filter with numerator y and
>> >> > denominator x! This will, in general, be an IIR filter, thus w
has
>> >> > infinite length. The neat Matlab one-liner thus is
>>
>> >> > w = filter(y,x,[1 zeros(1,n)])
>>
>> >> > where n is the number of terms you want to compute in w.
>>
>> >> Why do you need the SPT for that one?
>>
>> >> Apart from that, your approach is sensitive to the usual
>> >> questions about poles and stability. If the denomiator
>> >> polynomial x has poles on or outside the unit circle your
>> >> approach blows up.
>>
>> >Of course it does. The OPs denominator has all of its poles outside
>> >the unit circle. That doesn't change the fact that this impulse
>> >response w is the one and only solution to the problem of finding w
>> >sucht that w*x = y.
>>
>> w = filter(y,x,[1 zeros(1,n)]) is the same as deconv. deconv give the
>> result with the rest... My question was if we can find w/
>> conv(w,vect1)=vect2 and eliminate the rest (rest=0)...
>
>What do you think: is there a method to divide 3 by 2 such that the
>rest = 0?
>
If we multiply with [1 0 0 0 ...] we can eliminate the rest.