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
 Forum for Origin C
 strange behaviour calculating dataset

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
bubbas Posted - 10/16/2006 : 09:17:27 AM
Origin Version (Select Help-->About Origin): 7.5E
Operating System: Win XP

hello,

i found a strange behaviour. I import some data into a worksheet. then i run a origin c function, which creates a new worksheet, lets say wks2. There it copies some columns from the first worksheet and also creates some new ones which are calculated using different columns of the first wks. finally it does some plots.

One of the calculated columns is calculated as follows:

Dataset dsXRMRQz(wks2,1);
wks2.Columns(1).SetName("qz");
double faktor = 0.001013546246585;
dsXRMRQz=faktor*energy*sin(dsAbsTheta*Pi/180);


energy is set to a value before that call. dsAbsTheta is a Dataset from an column of the first worksheet.

If I run the function, it calculates well the value of the first row. But not the rest! if I run the function a second time it calculates all rows correct. I don't know why :(

The second worksheet is created as follows:
	//neues Worksheet zum Arbeiten
Worksheet wks2;
wks2.Create();
wks2.GetPage().Rename("XRMR");


Also if i want to plot a column manually from this second Worksheet it doesn't work. I think this is a different problem ...

Can someone help me??

Thanks in advance

greetings

bubbas

Edited by - bubbas on 10/16/2006 09:20:21 AM
4   L A T E S T    R E P L I E S    (Newest First)
bubbas Posted - 11/02/2006 : 05:25:23 AM
no possibility ??
E
DIT:

okey, sorry seems this time it wasn't related to the problem above ..

fixed it creating a column containing sin(...) and then using the Dataset of this column.




Edited by - bubbas on 11/02/2006 07:35:22 AM
bubbas Posted - 10/31/2006 : 12:30:56 PM
now i have to calculate the following:

dsT2TSSAbs_AbsTheta=1.0/(sin(dsAbsTheta*Pi/180)*xi/mu+1);

dsT2TSSAbs_AbsTheta and dsAbsTheta Datasets. I have the same problem ...

thx

bubbas
bubbas Posted - 10/17/2006 : 04:53:35 AM
oh okey ;)

it works now changing the order!

Thanks!

greets

bubbas
easwar Posted - 10/16/2006 : 11:08:17 AM
Hi bubbas,

We could reproduce the bug - thank you for reporting this.
For now, changing the order of the computation in your statement, such as:
dsXRMRQz=sin(dsAbsTheta*Pi/180)*faktor*energy;
seems to fix the problem.

Easwar
OriginLab



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