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 problem

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
ovince Posted - 10/27/2006 : 03:43:50 AM
hi,

I have a very strange problem with Append() function.

In the example bellow, I calculate Dataset q (red) and what is appended to Worksheet wksNew (green) is not the same as q. I am checking the first element of q (pink) in the loop and what is appended to wksNew is not the same number. I check for other elements (q[1]....) also and the result is the same.

In summary, within the loop everything is calculated correctly but something goes wrong when append with Append().

what I do wrong?

//take 1st column
Dataset curr( wks, 1);

for (int j=2; j<11; j++)
{
//take next columns
Dataset next( wks, j );
printf("ln(HaHb): %f\n", ln(HaHb[j-1]/HaHb[0]));
Dataset div = -ln(next / curr);
printf("div[0]: %f\n", div[0]);
Dataset q = div/ln( HaHb[j-1]/HaHb[0] );
printf("q[0]: %f\n", q[0]);
Dataset tmpY(wksNew, j-1);
tmpY.Append(q);
}



oliver
1   L A T E S T    R E P L I E S    (Newest First)
ovince Posted - 10/27/2006 : 04:44:32 AM
hi

I found the problem. Sorry to everybody for false alarm

oliver

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