Matrix: Set Values...
Set matrix cell values with custom formula or script
Minimum Origin Version Required: Origin 8.5 SR0
X-Function not designed for Auto GetN Dialog.
1. msetvalue formula:="i*j+2i*j"
2. msetvalue im:=[MBook1]MSheet1!Mat(1) formula:="Mat(Sensor Amp)*0.5"; //When calling matrix object using matrix Long Name,e.g.,Sensor Amp, you should remove the quotation mark.
Please refer to the page for additional option switches when accessing the x-function from script
This X-Function is designed for realizing the same ability of the Setting Matrix Values tool in LabTalk environment, which are used to fill a matrix object with data.
This example is similar to the Set Matirx Values example, which shows you how to use the msetvalue X-Function to input values for a matrix object. To use the following scripts, please make sure there is a worksheet called MSheet1 in MBook1.
//Input values for the 1st matrix object of MSheet1
msetvalue im:=[MBook1]MSheet1!1 formula:="c1*sin(i) + c2*cos(j)" script:="c1=3;c2=4;"