Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: find zero values of sinc Date: Fri, 19 Dec 2008 00:58:02 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 22 Message-ID: <gieriq$mhv$1@fred.mathworks.com> References: <gieh8q$1g6$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: webapp-05-blr.mathworks.com Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1229648282 23103 172.30.248.35 (19 Dec 2008 00:58:02 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Fri, 19 Dec 2008 00:58:02 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:507893 "David " <REMOVEdavidg@UPPERCASEphy.LETTERSucsf.edu> wrote in message <gieh8q$1g6$1@fred.mathworks.com>... > hi all: > > i want to find the zero values of sinc, where sinc = sin(pi*x)./(pi*x) > > x = -5.5:0.1:5.5; > sinc = sin(pi*x)./(pi*x); > plot(x, sinc) > > you can clearly see the zero crossings, but find(sinc == 0) is null (i think) because i've discretized a continuous function, and none of the values are exactly zero. > > then i tried to convert sinc into a continuous function: mysinc = @(x)sin(pi*x)./(pi*x) > (don't ask me why i didn't type mysinc = 'sin(pi*x)./(pi*x)'; instead, because i learn by example) > > this is where i get stuck. matlab seems to have good ways to find the roots of polynomials, but this function is not a polynomial. do i need to convert it into a polynomial form using euler relations or something ? > > Thanks! This is just what matlab's 'fzero' is designed for. The trick in using it is in choosing the appropriate initial estimate, and since sinc has infinitely many zero crossings that is especially important in converging on the one you want. Roger Stafford