Using-OC-Functions
Besides define LabTalk function, you can also define an Origin C function (see Creating and Using Origin C Code for details) which returns a single value, and call the function from command window. For example,
double MyFunc (double x) { return sin(x) + cos(x); }
newbook; // create a new workbook col(A) = data(1, 32); // fill row number col(B) = MyFunc(col(A)); // call the Origin C function, result is put to column B