From: FAISAL PEER MOAHMED on 19 May 2010 08:45 Hi I wish to add zeros the end of the signal. I have used horizontal concatenation. Please see the code below. q= ones(1,1966081 ); w=[q zeros(1023,1)]; It ends up with an error. Error using ==> horzcat CAT arguments dimensions are not consistent. Please help Regards Faisal
From: Sean on 19 May 2010 09:00 "FAISAL PEER MOAHMED" <pfaisalbe(a)gmail.com> wrote in message <ht0mh1$req$1(a)fred.mathworks.com>... > Hi > > I wish to add zeros the end of the signal. I have used horizontal concatenation. Please see the code below. > > q= ones(1,1966081 ); > w=[q zeros(1023,1)]; > > It ends up with an error. > > Error using ==> horzcat > CAT arguments dimensions are not consistent. You're trying to concatenate a [1x1966081] with a [1023x1]. It's not going to work: try: >> w=[q zeros(1,1023)];
From: Wayne King on 19 May 2010 09:04 "FAISAL PEER MOAHMED" <pfaisalbe(a)gmail.com> wrote in message <ht0mh1$req$1(a)fred.mathworks.com>... > Hi > > I wish to add zeros the end of the signal. I have used horizontal concatenation. Please see the code below. > > q= ones(1,1966081 ); > w=[q zeros(1023,1)]; > > It ends up with an error. > > Error using ==> horzcat > CAT arguments dimensions are not consistent. > > Please help > > Regards > > Faisal Hi, that's because q is a row vector while w is a column vector. Wayne
From: FAISAL PEER MOAHMED on 19 May 2010 09:16 Thanks. I have tried , same error repeats Regards Faisal "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <ht0nd8$pbb$1(a)fred.mathworks.com>... > "FAISAL PEER MOAHMED" <pfaisalbe(a)gmail.com> wrote in message <ht0mh1$req$1(a)fred.mathworks.com>... > > Hi > > > > I wish to add zeros the end of the signal. I have used horizontal concatenation. Please see the code below. > > > > q= ones(1,1966081 ); > > w=[q zeros(1023,1)]; > > > > It ends up with an error. > > > > Error using ==> horzcat > > CAT arguments dimensions are not consistent. > > > > You're trying to concatenate a [1x1966081] with a [1023x1]. It's not going to work: > try: > >> w=[q zeros(1,1023)];
From: Doug Hull on 19 May 2010 09:25 a = [1 2 3]; a(10) = 0 a = 1 2 3 0 0 0 0 0 0 0 "FAISAL PEER MOAHMED" <pfaisalbe(a)gmail.com> wrote in message <ht0oak$r20$1(a)fred.mathworks.com>... > Thanks. I have tried , same error repeats > > Regards > > Faisal > > > > > "Sean " <sean.dewolski(a)nospamplease.umit.maine.edu> wrote in message <ht0nd8$pbb$1(a)fred.mathworks.com>... > > "FAISAL PEER MOAHMED" <pfaisalbe(a)gmail.com> wrote in message <ht0mh1$req$1(a)fred.mathworks.com>... > > > Hi > > > > > > I wish to add zeros the end of the signal. I have used horizontal concatenation. Please see the code below. > > > > > > q= ones(1,1966081 ); > > > w=[q zeros(1023,1)]; > > > > > > It ends up with an error. > > > > > > Error using ==> horzcat > > > CAT arguments dimensions are not consistent. > > > > > > > > You're trying to concatenate a [1x1966081] with a [1023x1]. It's not going to work: > > try: > > >> w=[q zeros(1,1023)];
|
Next
|
Last
Pages: 1 2 Prev: fopen doesn't always open Next: data acquisition using NI 9172 through matlab |