From: Rune Allnor on 24 Sep 2009 09:37 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...? Rune
From: Andor on 24 Sep 2009 09:42 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 :-).
From: sofiyya on 24 Sep 2009 09:49 >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?). > >:-) > > >On 24 Sep., 14:27, "sofiyya" <karimae...(a)gmail.com> wrote: >> Thank you for your response, >> >> Yes, with pencil and paper we can calculate w but it will be difficult for >> a long vector, that's why I look for a methods to do it with matlab.. Maybe >> it's impossible or maybe this depends on the coefficients of vect1 or >> vect2.. I guess that we can't always find w / conv(w,vect1)=vect2; >> >> >> >> >> >> >On 24 Sep., 10:45, Andor <andor.bari...(a)gmail.com> wrote: >> >> On 24 Sep., 09:49, "sofiyya" <karimae...(a)gmail.com> wrote: >> >> >> > >On Sep 23, 7:25 am, "sofiyya" <karimae...(a)gmail.com> wrote: >> >> >> > This is the result I get when I don't truncate w: >> >> >> > ans =3D >> >> >> > =A0 Columns 1 through 9 >> >> >> > =A0 =A0-0.0903 =A0 -0.2708 =A0 -0.5417 =A0 -0.9028 =A0 -0.7292 =A0 >> -0.5= >> >208 =A0 -0.2778 =A0 >> >> > -0.0000 =A0 =A00.2778 >> >> >> > =A0 Columns 10 through 16 >> >> >> > =A0 =A0 1.4583 =A0 =A02.7292 =A0 =A04.0903 =A0 =A05.5417 =A0 >> =A00.8333 = >> >=A0 =A00.5903 =A0 =A00.3125 >> >> >> > which is also wrong! >> >> >> Your method is flawed alltogehter. In general, w will have infinite >> >> length. Any truncation to use the FFT won't produce the expected >> >> results. w can be found through long division of v2 by v1. This is >> >> very simple to do with pencil and paper, the first couple of values in >> >> w are >> >> >> w =3D [1 0 0 0 -5 4 ...] >> >> >If you add 5 more terms yourself, I'll reveal the matlab one-liner >> >that calculates w to arbitrary length :-).- Zitierten Text ausblenden - >> >> - Zitierten Text anzeigen - > > w must have only 6 items to get the right answer!
From: Rune Allnor on 24 Sep 2009 09:49 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. Rune
From: sofiyya on 24 Sep 2009 09:53 >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...? > >Rune > I know your function: is deconv(vect1,vect2);
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: Regarding Digital NCO design Next: Alternatives to CEVA, Tensilica and CoolFlux NXP |