Hi,On page 18 of the Origin 5.0 LabTalk manual two methods to access individual dataset elements are described. Use either the datasetname[i] notation (with square brackets) or the %(WorksheetName,ColumnNumber,RowNumber) notation. See also page 19 of the Origin 5.0 LabTalk manual where Using Datasets as Functions is documented. The syntax datasetname(x) actually returns an interpolated value of the Y dataset datasetname for a given X value. Generally, in Origin, square brackets are used to index datasets and parentheses are used to indicate "function of."
In your specific case, %s_EM(27) returns the interpolated Y value of the dataset %s_EM whose X value is 27. Try %s_EM[27] which will return the 27th element of the dataset %s_EM (which will equal %(%s,3,27)).
Thanks for this question...I'm sure others have made this same mistake...I know I did. This actually points out a useful (albeit subtle) feature of Origin.
Gary Lane
Technical Support Engineer
Microcal Software
[This message has been edited by Gary Lane (edited 02-01-99).]
[This message has been edited by Gary Lane (edited 02-01-99).]
[This message has been edited by Gary Lane (edited 02-01-99).]