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
 why is this data disappearing

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
984527 Posted - 08/22/2012 : 4:58:44 PM
I have a weird problem. I figured out a workaround, but I'd like to know why this is happening.

I'm looping through some columns in one workbook, calculating statistics, and putting results into cells of another workbook. Very simple. The output workbook is active throughout the loop. One the first loop, all goes well: stats show up in the first row. On the second pass through the loop, data from the first row gets erased, then data appears in the second row. On the third pass through the loop, data from the third row disappear and data appears in the third row. And so on. I used sec -e to pause at the bottom of the loop to make sure that's what's happening. Huh? Here's the problematic code:

loop(pIndex, 1, 4) {
	range InputCols = [%(InputBookF$)](1:5)!$(pIndex+1);	
	stats ix:=InputCols mean:=Col(2)[pIndex] sd:=Col(3)[pIndex];
};


Here's code that works (nothing disappears):
loop(pIndex, 1, 4) {
	range InputCols = [%(InputBookF$)](1:5)!$(pIndex+1);
	stats ix:=InputCols mean:=AllMean sd:=AllSD;

	Col(2)[pIndex] = AllMean;
	Col(3)[pIndex] = AllSD;
};

The quantiles x-function does the same thing - stuff disappears when I move on to the next row if I don't put the output in a variable.

I'm using OriginPro 8.5 SR1 on Windows 7.
1   L A T E S T    R E P L I E S    (Newest First)
Kathy_Wang Posted - 08/23/2012 : 02:48:25 AM
Hi,

This is a bug in 8.5 SR1, and it has been fixed already since 8.5.1.

Kathy
Originlab

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