From: Lauren Gavy on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hv73ag$fnd$1(a)fred.mathworks.com>...
> "Lauren Gavy" <laurengavy(a)gmail.com> wrote in message <hv7315$rie$1(a)fred.mathworks.com>...
> > "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hv71vc$mgu$1(a)fred.mathworks.com>...
> > > "Lauren Gavy" <laurengavy(a)gmail.com> wrote in message <hv70o0$2qs$1(a)fred.mathworks.com>...
> > > > I tried almost everything, but with no success. Any ideas ?
> > > > Here's the link for the formula in a jpg format :
> > > >
> > > > http://forum.bgu.co.il/uploads/monthly_06_2010/post-24033-12765479851708.jpg
> > > >
> > > > Thank you
> > >
> > > Try
> > >
> > > theta = 0.5*atan2(2*I11, I20-I02)
> > >
> > > Read the doc is also sometime helpful.
> > >
> > > Bruno
> >
> > Thank you for your answer and I'm sorry for the double post. I read the doc but couldn't get it to work, It's the exact thing I tried. The error I'm getting is:
> >
> > ??? Undefined function or method 'atan2' for input arguments of type 'uint8'.
>
> Convert your image to *double* before doing any computation.
>
> Im = imread(somefile);
> Im = double(Im);
> % ...
>
> % Bruno

Problem solved, thank you and have a great day!
From: Steven Lord on

"Lauren Gavy" <laurengavy(a)gmail.com> wrote in message
news:hv70o0$2qs$1(a)fred.mathworks.com...
>I tried almost everything, but with no success. Any ideas ? Here's the link
>for the formula in a jpg format :
>
> http://forum.bgu.co.il/uploads/monthly_06_2010/post-24033-12765479851708.jpg
>
> Thank you

Are you certain that the equation you posted is actually a call to ATAN2?
The spacing between the first A and the T as well as the N and the 2 makes
me a little suspicious as to whether it's asking you to compute
(a/2)*tan(2*...).

You might want to double-check with the source of that equation to determine
if it intends you to call ATAN2 or to call TAN.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com


From: Bruno Luong on
"Steven Lord" <slord(a)mathworks.com> wrote in message <hv815t$oup$1(a)fred.mathworks.com>...
>
> "Lauren Gavy" <laurengavy(a)gmail.com> wrote in message
> news:hv70o0$2qs$1(a)fred.mathworks.com...
> >I tried almost everything, but with no success. Any ideas ? Here's the link
> >for the formula in a jpg format :
> >
> > http://forum.bgu.co.il/uploads/monthly_06_2010/post-24033-12765479851708.jpg
> >
> > Thank you
>
> Are you certain that the equation you posted is actually a call to ATAN2?
> The spacing between the first A and the T as well as the N and the 2 makes
> me a little suspicious as to whether it's asking you to compute
> (a/2)*tan(2*...).

Steve it looks like this formula computed the phase angle (thus the name "theta") from intensity (perhaps from some interferometer data).

Bruno