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
 worksheet calcultations

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
pcvolkmar Posted - 08/04/2005 : 10:25:48 AM
Origin Version (Select Help-->About Origin):
Operating System:win xp

Hello,
now i'm working with some worksheet.

Data1: Data2:
A(X) B(Y) A(X) B(Y)
1 6 3 9
2 7 4 4
3 8 5 3
.. .. ... ...

(example)

I want to creat this worksheet: results:

M1(X) M2(Y) M3(Y) M4(Y) ....
where=> col(M1)=A(X) from Data1
col(M2)=B(y) from Data1
col(M3)=A(X) from Data2
col(M1)=B(y) from Data2

I have do it this:
%W=Data1;
%W=Data2;

creat resultados 20;
edit resultados;

copy %W_A resultados;
copy -a %W_B resultados;

worksheet -a 2;
worksheet -n 1 uno;
worksheet -n 2 dos;
worksheet -n 3 tres;
Worksheet -n 4 cuatro;


but but the result is not the correct one.

M1(X) M2(Y) M3(Y) M4(Y) ....
1
2
...
9
4
3
How I can make col(M1)=A(X) from Data1??

Thanks!!
7   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 08/05/2005 : 10:19:34 AM
The proper way to address an Origin dataset is by its full name, which is wksName_colName. For example, to multiply all values of column B in Data1 by two...

Data1_B *= 2;

That works whether Data1 is active or not. If Data1 is active (on top) then you can address the column by name alone like this...

col(B) *= 2;

a) Use this to get the number of rows and cols in wks Data1...

ncols = Data1!wks.ncols;
nrows = Data1!wks.nrows;

That will also work whether or not Data1 is active.

I will be offsite the rest of today and out of internet contact. Perhaps someone else can step in if you have more questions.

Mike Buess
Origin WebRing Member
pcvolkmar Posted - 08/05/2005 : 09:13:23 AM
I think that when I knows these two things, I will let make so many questions.

a) how to now the number of rows and columns
b)
for example:
I have some worksheets(some tables).Each one has a speciall name.
Spektrum
A(X) B(Y) C(Y) ...

OLEDS
A(X) F(Y) G(Y) H(Y) ....

... and so on.
how I can specify in the program:
That I want to work with all the columns of all worksheets in a new worksheet.
I think that I do not clarify myself with naming to the worksheets
Is there something to do this:
newworksheet=spektrum_col(B)

I try to do this in my script:
win -t D;//create new wks from default template

worksheet -a 12;
worksheet -n 1 nm;
worksheet -n 2 Wellenlänge;
worksheet -n 3 fi;
...

copy Data1_A col(nm);
copy -b 360 Data1_A col(fi) -b 1 -e 536;
copy Data2_B col(fi);
copy Data1_F col(vx);
copy Data1_G col(vy);
...

Some times say me that:
Can not copy.Data1_a is not a dataset
ok, and you have told that maybe: Either Data1 does not exist or it does not have a col A.
how I to create/to activate/to work with the names of the worksheets??

where I can be instructed?

Thanks a lot.

Mike Buess Posted - 08/05/2005 : 06:38:54 AM
Either Data1 does not exist or it does not have a col A.

BTW, you last statement is incomplete. I think it should be this...

copy -b 360 Data2_B col(fi) -b 1 -e 536;

Mike Buess
Origin WebRing Member
pcvolkmar Posted - 08/05/2005 : 06:28:54 AM
win -t D; // create new wks from default template

worksheet -a 9;

worksheet -n 1 nm;
worksheet -n 2 Wellenlänge;
worksheet -n 3 fi;
worksheet -n 4 xbar;
worksheet -n 5 ybar;
worksheet -n 6 zbar;
worksheet -n 7 größX;
worksheet -n 8 größY;
worksheet -n 9 größZ;
worksheet -n 10 kleinx;
worksheet -n 11 kleiny;

copy Data1_A col(nm);
copy Data2_B col(vx);
copy Data3_C col(vy);
copy Data4_D col(vz):

copy -b 360 Data2_B col(fi) -b 1 536;

But the program say:Can not copy.Data1_a is not a dataset.
Mike Buess Posted - 08/05/2005 : 06:25:59 AM
Say you have two worksheets, Data1 and Data2, and Data1 is active. If columns M1, M2 and M5 are in Data1 then your expression will work. If they are in Data2 you must use this...

Data2_M5 = Data2_M1 + Data2_M2;

That form always works whether or not the worksheet is active. Therefore,

Data1_M5 = Data1_M1 + Data1_M2;
// and -
col(M5) = col(M1) + col(M2);

will do the same thing if Data1 is the active worksheet.

Mike Buess
Origin WebRing Member
pcvolkmar Posted - 08/05/2005 : 04:55:27 AM
I now that's a esay question.
I'm already in the beginnin with the program,I hope that you have patience.

why I can't do this?

worksheet -a 4;
worksheet -n 5 M5;
worksheet -n 6 M6;
worksheet -n 7 M7;
worksheet -n 8 M8;
worksheet -n 9 M9;

col(M5)=col(M1)+col(M2);

I believe that my problem is that I not to work with more than one worksheet and naming them.

Thanks
Mike Buess Posted - 08/04/2005 : 11:21:34 AM
win -t D; // create new wks from default template
worksheet -a 2;
worksheet -n 1 M1;
worksheet -n 2 M2;
worksheet -n 3 M3;
worksheet -n 4 M4;
copy Data1_A col(M1);
copy Data1_B col(M2);
copy Data2_A col(M3);
copy Data2_B col(M4);

Mike Buess
Origin WebRing Member

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