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
 Call function...help

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
Bigprophete Posted - 06/05/2015 : 05:20:34 AM
Hi,

I have a little question...I have created a program (see the next of the message) which works very well. But after to open origin, I don't want to copy/past my line program and compile it before to use my function...I just want to call my function vsm and put my value in ().

I am searching a line code like run.section (name data file)... but when I do it with my file function, it doesn't work...

Any idea ?

function vsm (double Slope) {
doc -ef W {

wks.col1.name$ = Field ; // rename column as Field
wks.col2.name$ = Data ; // rename column as Data
wks.addcol(mcorr); // add a column for mcorr, named mcorr

col(mcorr)=col(Data)/col(Corr);


wks.addcol(Datasub);
wks.addcol(Magnetization);
Col(Field)[U]$ = Oe; // Set column unit
Col(Data)[U]$ = emu; // Set column unit
Col(Datasub)[U]$ = emu; // Set column unit
Col(Magnetization)[U]$ = Tnm; // Set column unit


col(Datasub)=col(mcorr)+Slope*col(Field); // substract paramagnetism

}
};
3   L A T E S T    R E P L I E S    (Newest First)
Bigprophete Posted - 06/07/2015 : 8:52:59 PM
Great ! It works !! :) Thank you very much for your help.
Bigprophete Posted - 06/07/2015 : 8:35:17 PM
Thank you very much, I will tried

With best regards
SeanMao Posted - 06/05/2015 : 06:28:43 AM
Hi,

To run a function written by LabTalk, you have to firstly save an OGS file under User File Folder. Then as shown in the figure below:



Then you can run the function by:


run.section(Test1, Test, 5)


Regards!

Sean




quote:
Originally posted by Bigprophete

Hi,

I have a little question...I have created a program (see the next of the message) which works very well. But after to open origin, I don't want to copy/past my line program and compile it before to use my function...I just want to call my function vsm and put my value in ().

I am searching a line code like run.section (name data file)... but when I do it with my file function, it doesn't work...

Any idea ?

function vsm (double Slope) {
doc -ef W {

wks.col1.name$ = Field ; // rename column as Field
wks.col2.name$ = Data ; // rename column as Data
wks.addcol(mcorr); // add a column for mcorr, named mcorr

col(mcorr)=col(Data)/col(Corr);


wks.addcol(Datasub);
wks.addcol(Magnetization);
Col(Field)[U]$ = Oe; // Set column unit
Col(Data)[U]$ = emu; // Set column unit
Col(Datasub)[U]$ = emu; // Set column unit
Col(Magnetization)[U]$ = Tnm; // Set column unit


col(Datasub)=col(mcorr)+Slope*col(Field); // substract paramagnetism

}
};


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