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 for Programming
 LabTalk Forum
 behavior of average command

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
ibvmt Posted - 12/09/2004 : 06:23:45 AM
Origin Version (Select Help-->About Origin): 7.5
Operating System: win XP pro

Hi
I have data columns that are only partially filled (gaps of some empty lines). The problem now is, that the ave command creates more data than was originally present.
If I create a new worksheet (all cells are empty), enter some data and use the ave command, I get as many data points as I entered before.
If I have a column filled with values and delete them, then the cells are filled with dashes. Using the ave command on data cells surrounded by cells with dashes creates more data points. How could this be prevented?
Thanks
Peter
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 12/16/2004 : 12:16:29 PM
You do not mention which options you are using, but you are seeing normal behavior.
With no option, as in :
average data1_b
a cell will be replaced by the average of itself and each neighbor - normally three values except at the 'ends'.
If a particular cell has missing values the process is still the same except the value of the cell and its count is not considered.

So 3 followed by missing followed by 9 will result in the missing value being replaced by 6 ( ( 3 + 9 ) / 2 = 6 ).

The average command is destructive in that it replaces the dataset operated on. If you worked with a copy, you could restore those missing values with this script :

col(2) = col(1)==0/0?0/0:col(2);

where column 1 is the original data and column 2 holds the values as averaged.



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