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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 why is this data disappearing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

984527

USA
13 Posts

Posted - 08/22/2012 :  4:58:44 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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.

Kathy_Wang

China
159 Posts

Posted - 08/23/2012 :  02:48:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

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

Kathy
Originlab

Edited by - Kathy_Wang on 08/23/2012 02:50:30 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000