Author |
Topic  |
|
l-sinks
USA
Posts |
Posted - 02/18/2011 : 10:13:19 AM
|
Origin Ver. and Service Release (Select Help-->About Origin): 7.5 SR7 Operating System: Win XP
I am very confused about the min and max functions. Following the example in the wiki it says:
dd=max(col(A)); dd=; // Should return the maximum value of column(A).
If I run this from the script window, with the worksheet open, the dd= returns the first element of col(a)- not the max element.
Similarly, if I use the code: col(c)=col(d); b=max(col(d)); col(d)=col(c)/b;
in an import script, instead of producing a normalized dataset (which is what I want), it produces a column entirely of ones. Somehow, the function max seems to be returning the entire column, instead of the single max value.
Please help.
Additionally, is there a pdf of the lab talk manual for v.7.5. I cannot find one online, and there seem to be a lot of changes between 7.5 and 8. The help menus are annoying, because I sometimes don't notice that I've ended up in a origin c section and not a labtalk section, and then end up spending hours frustrated.
Thanks, Louise |
|
greg
USA
1379 Posts |
Posted - 02/21/2011 : 3:39:08 PM
|
When you look at the Wiki, you are looking at ongoing development in Origin. Your Help files are a snapshot of the Wiki when your version was new (there may be items missing). The Wiki currently reflects what is in version 8.5, so check for version information on any Wiki page before assuming it works in your version. If none is present and you have an older version, you should test any code you find on the Wiki in your version.
If you use the Search function to find min or max in the Help file, the Location column clearly states whether the information is LabTalk, Origin C or X-Function. Up until Origin 8 SR6, the Help explained that the LabTalk min function did not accept datasets as an argument - only a list of up to 10 numbers
Origin 8SR6 modified the Min and Max LabTalk functions to act like the Min and Max Origin-C functions and work with data. (In fact, SR5 made the change, but the Help snapshot missed that fact.)
Here is a link to documentation download: http://www.originlab.com/index.aspx?go=Downloads&pid=612
Note that there is no LabTalk Manual PDF since the Manual was printed from the Help file. |
 |
|
|
Topic  |
|
|
|