13.07.2015 Views

Download pdf guide - VSN International

Download pdf guide - VSN International

Download pdf guide - VSN International

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

50 5 Calculations and manipulation340.00 315.00425.00 400.00435.00 410.00We can also include ordinary numbers. By putting the amount of the bonus into the scalarstructure we can use it again (without having to remember its exact value) later in theprogram. But if it were not needed later, we could simply putCALCULATE pay1 = pay + 25GenStat provides many functions for use in expressions. A concise description of eachone, in alphabetical order, is in Section 4.2 of the Reference Manual, Part 1 Summary,which can be accessed by clicking on the Summary sub-option of the Reference Manualoption of the Help menu on the menu bar. Alternatively, a more detailed description is inSection 4.2 of the Guide to the GenStat Command Language, Part 1 Syntax and DataManagement, which can be accessed by clicking on the Syntax and Data Management suboptionof the GenStat Guides option of the Help menu on the menu bar.Many functions are transformations. These produce a result that is the same type ofstructure as the argument of the function. One example is the LOG10 function, whichtransforms numbers to logarithms with base 10. So, in line 18, the commandCALCULATE logS25 = LOG10(S25)gives a scalar result as S25 is a scalar, whereas the commandCALCULATE logpay1 = LOG10(pay1)in line 20 generates a variate with 10 values, to match pay1.15 " There are many functions. Some produce a result-16 of the same type as the input to the function:-17 e.g. transform S25 and pay1 to logarithms base 10."18 CALCULATE logS25 = LOG10(S25)19 PRINT S25,logS25S25 logS2525.00 1.39820 CALCULATE logpay1 = LOG10(pay1)21 PRINT name,pay1,logpay1; DECIMALS=0,2,4name pay1 logpay1Clarke 362.50 2.5593Innes 343.75 2.5362Adams 625.00 2.7959Jones 312.50 2.4949Day 275.00 2.4393Grey 300.00 2.4771Edwards 377.50 2.5769Baker 340.00 2.5315Hill 425.00 2.6284Foster 435.00 2.6385These are some of the most useful transformations.Mathematical transformationsCOS(x)cosine of x, for x in radians.EXP(x)xexponent of x: e .LOG(x) natural logarithm of x, for x > 0.LOG10(x) logarithm to base 10 of x, for x > 0.SIN(x)sine of x, for x in radians.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!