The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 normalize angles

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Giammy85 Posted - 03/03/2011 : 2:16:41 PM
I have a column with angles in deg that I have to normalize to 0->360deg.
If in "set column values" I use rmod[col(x),360] then I have angles that span -360 +360!
Basically, something like -380 must be turned to 340; how can you do that in Origin?
Thanks

Origin Ver. and Service Release (Select Help-->About Origin): v8.0
Operating System: Windows7
5   L A T E S T    R E P L I E S    (Newest First)
Giammy85 Posted - 03/06/2011 : 2:26:28 PM
oh yes, thanks Larry
larry_lan Posted - 03/05/2011 : 02:03:01 AM
Supposed now col(b) was normalized to [0, 360], transform col(b) into col(c) as:

col(b)<=180?col(b):col(b)-360

Larry
Giammy85 Posted - 03/04/2011 : 08:15:23 AM
Now I have angles for which is more convenient plotting them in the region -180->180deg.

Basically, if I have an angle<-180 then I should add 360 to it, if I have an angle>180 then I should subtract 360 to it.

it should be something like that
-180<rmod(col(a),360)<180?rmod(col(a),360): .....
else if
-180>rmod(col(a),360) => ( 360+rmod(col(a),360))
180<rmod(col(a),360) => (-360+rmod(col(a),360))

how can I do that?
Giammy85 Posted - 03/04/2011 : 07:00:18 AM
That works fine, thanks Larry
larry_lan Posted - 03/04/2011 : 02:44:27 AM
You need condition statement. If you are using the Set Column Value dialog, try this formula (suppose col(a) is source data):

mod(col(a),360)>0?mod(col(a),360):(360+mod(col(a),360))

Thanks
Larry

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000