From: Greg Heath <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: angle function in matlab
Date: Sat, 16 Jul 2011 07:24:34 -0700 (PDT)
Lines: 19
Message-ID: <>
References: <ivq9n0$rpn$>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: 1310826275 18898 (16 Jul 2011 14:24:35 GMT)
NNTP-Posting-Date: Sat, 16 Jul 2011 14:24:35 +0000 (UTC)
Injection-Info:; posting-host=; posting-account=mUealwkAAACvQrLWvunjg50tRAnsNtJR
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: ARLEUHNKC
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe)
Xref: comp.soft-sys.matlab:736481

On Jul 15, 4:59 pm, "Penny " <> wrote:
> I am doing with some ultasound data now. I want to find out the phase difference between the RF data of two adjacent elements. But when i use angle function in matlab, i find a problems:
> when i do this
> t=0:0.05:2*pi;
> a=sin(2*pi*t);
> plot(angle(hilbert(a)))
> I don't know why the first phase is not zero.
> Could anyone tell me where the problem is? Many thanks!

phase of the cosine is 0
phase of the sine is pi/2

Hope this helps.