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 |
|
|