SetMatVal-EnterExpression
The expression used in the Set Values dialog should follow LabTalk syntax. The expression can contain arithmetic operators, range variables, built-in LabTalk functions and user-defined functions etc. There are two places to define expressions:
Cell(i,j) = c1*sin(i) + c2*cos(j).
You can add a single-line expression in the Formula edit box and leave the Before Formula Scripts panel empty. The expression in the Formula edit box can include built-in functions and user-defined functions. The following is an example that shows how functions can be used.
Example 1:
You can input multi-line LabTalk scripts in the Before Formula Scripts edit box and leave the Formula edit box empty. In addition to built-in functions or user-defined functions, any LabTalk scripts are supported here. So you can use range variables, string variables, loops and LabTalk accessible X-Functions.
The following example will get the same results as Example 1.
Example 2:
Often, we need to enter scripts in both the Formula edit box and the Before Formula Scripts panel. For example, you can define range variables in Before Formula Scripts and then use them in Formula.
Example 3: