[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie Question
- Subject: Re: Newbie Question
- From: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>
- Date: 23 Aug 1999 14:28:03 -0500
- Newsgroups: comp.lang.idl-pvwave
- Organization: U. Wisc. Madison Physics -- Compact Objects
- References: <37C199F3.F52C5BB4@ucdavis.edu>
- Reply-To: craigmnet(at)cow.physics.wisc.edu
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:16256
Dan Fletcher <djfletcher@ucdavis.edu> writes:
>
> Coeff=DIGITAL_FILTER(Flow,Fhigh,50,40)
> FilteredTestDataSub=CONVOL(Data[0,*],Coeff)
>
> When I do this, I get an error that says
>
> CONVOL: Kernel's dimensions are incompatible with operand's.
>
> I think this is because the Data[0,*] gives a 1xm array rather than a
> vector of length m. I can't figure out any way to change that 1xm array
> into a vector without a FOR DO loop. Is there some simple way to solve
> this problem?
>
I don't know much about the digital filtering, but if you want to
convert a matrix to a vector, it's pretty simple. Like this:
FilteredTestDataSub=CONVOL( (Data[0,*])[*] ,Coeff)
Any vector or matrix with a [*] after it will be converted to a
one-dimensional vector. The parentheses are needed because Data[0,*]
is an expression.
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------