LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wrap phase

Labview 7.1
       It has the functiong for unwrapping phase.
       But, now, I need to convert an array of phase data to range -180 deg and 180deg (wrap?).  Is there any way to do that easily or any algorithm?
 
Thanks.
 
Weitong
 
 
 
  
0 Kudos
Message 1 of 4
(3,855 Views)
You can use the Quotient & Remainder function. using a for loop, let x = your array element and y = 360. The Remainder will be your wrapped phase ( 0 - 360 ). Add -180 to your remainder.






Message Edited by Phillip Brooks on 04-09-2008 07:55 AM
Message 2 of 4
(3,831 Views)

I had to do the same thing a few years ago...basically I wrote my own function in a formula node. That code now belongs to the people that hired me for the task, so I don't have the code to send you, but it was a pretty simply

 int32 y;

if (x >180)

     y = x -180;

else if (x < -180);

     y = x +180;

else

    y = x;

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
Message 3 of 4
(3,828 Views)
Thanks.
0 Kudos
Message 4 of 4
(3,798 Views)