02-25-2009 07:06 AM
I decided to use MathScript, which unlike Mathlab, seems only to work on 1D arrays so I still need a loop as shown below.
Does any one know how to improve this with or without mathscript code?
Does anyone know where I can find a good list and description of MathScript commands?
B=Array(:,1)
rows=numel(B)
A=Array(1,:)
cols=numel(A)
for J=1:1:cols
Averaged(J)=sum(Array(:,J))/rows
end
Array is a 2D array passed to the MathScript node, Averaged is the average of all rows of Array.
02-25-2009 07:23 AM
Hi AHF,
you can use LabVIEW functions.
See the attached image.
Mike
02-25-2009 08:12 AM
Just do that
02-25-2009 09:03 AM - edited 02-25-2009 09:04 AM
Mike's example can be simplified to this:
AHF wrote:Does anyone know where I can find a good list and description of MathScript commands?
The LabVIEW Help. From the Index tab, Mathscript->classes of functions.