Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!e21g2000vbz.googlegroups.com!not-for-mail
From: Greg Heath <heath@alumni.brown.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: angle function in matlab
Date: Sat, 16 Jul 2011 07:24:34 -0700 (PDT)
Organization: http://groups.google.com
Lines: 19
Message-ID: <451c6b30-6ec1-4dd4-940e-8ebd961f26c2@e21g2000vbz.googlegroups.com>
References: <ivq9n0$rpn$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: 69.242.101.137
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1310826275 18898 127.0.0.1 (16 Jul 2011 14:24:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 16 Jul 2011 14:24:35 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: e21g2000vbz.googlegroups.com; posting-host=69.242.101.137; 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: news.mathworks.com comp.soft-sys.matlab:736481

On Jul 15, 4:59 pm, "Penny " <pqq3393...@yahoo.com.cn> 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.

Greg