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
 How to return the column value from stringĦH

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
Anow Posted - 02/20/2006 : 9:51:23 PM
Origin Version (Select Help-->About Origin): Pro7.5
Operating System: XP

Now, I have two column. First column's values are TextĦ]stringĦ^ and second column's values are numbers. How can I get the numbers of second column by using the textĦ]stringĦ^ of first column.

Ex. Data_A[1]=a, Data_A[2]=b, Data_B[1]=2, Data_B[2]=3
I want to use the property string "b" and return value "3".
My idea seems Data_B(b)=3, but this method is wrong due to "b" string.
3   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 02/22/2006 : 1:33:05 PM
Sounds like you have a worksheet with two columns, the first has string values and the second has numeric values...

A B
a 2
b 3
c 4

You want to find the numeric value for a given string. If that's correct then this will work...

%A=b;
nn=0/0;
for(ii=1;ii<=wks.maxrows;ii++) {
if(cell(ii,1)$==%A) {nn=cell(ii,2); break};
};
nn=;
NN=3

Mike Buess
Origin WebRing Member
Anow Posted - 02/22/2006 : 11:20:25 AM
I want "Data_B(b)=3".String "b" is xvalue and Number 3 is "yvalue"(col(B)) accroding to xvalue. Not Data2_A[2]$=test.
rexsoft Posted - 02/21/2006 : 12:29:30 AM
Data2_A[2]$=test;

may be you success !!

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