From: Natalie Sin Hwee on
"Roger Stafford" <ellieandrogerxyzzy(a)mindspring.com.invalid> wrote in message <i413p4$6og$1(a)fred.mathworks.com>...
> "Natalie Sin Hwee " <sin.ng09(a)imperial.ac.uk> wrote in message <i40t2s$f0u$1(a)fred.mathworks.com>...
> > Dear Roger,
> > Thank you very much for your detailed help, i managed to interpret it into my code. Was wondering if i could obtain Theta from 0 to 2Pi (instead of -pi to +pi).
> > Thank you verymuch
> >
> > Natalie
> - - - - - - - - - - -
> If you want to retain the theta angles from 0 to pi as they are at present and add 2*pi to those that are negative, you can change the last line to:
>
> theta = mod(atan2(D(2),D(1)),2*pi);
>
> Roger Stafford

Dear Roger,

Oh right! wow why didnt i think about that! Ure a star!! THANK YOU!!

Regards
Natalie